[ASTERIXDB-2299] Set log type properly during modifications

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Previously we have a deadlock-free protocol during normal ingestion
pipeline. When the try lock fails, we flush the frame partially so that
they can release locks, and log a WAIT record to wake up after that.
However, after logging the WAIT record, we didn't set the log type
back to UPDATE. This seriously degrades the ingestion performance
afterwords since all updates log records would become WAIT log records,
which require heavier logic to process upon the log is flushed to
disk.

Change-Id: Ibcf93072ca0833cb24ba6719796f58df56384c3b
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2424
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java
index a6cb61c..2c8079d 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java
@@ -107,5 +107,7 @@
         logRecord.setLogType(LogType.WAIT);
         logRecord.computeAndSetLogSize();
         txnSubsystem.getLogManager().log(logRecord);
+        // set the log type back to UPDATE for normal updates
+        logRecord.setLogType(LogType.UPDATE);
     }
 }