Luo Chen has submitted this change and it was merged.

Change subject: [ASTERIXDB-2299] Set log type properly during modifications
......................................................................


[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 <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Reviewed-by: Murtadha Hubail <[email protected]>
---
M 
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  Jenkins: Verified; No violations found; 
  Murtadha Hubail: Looks good to me, approved



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);
     }
 }

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2424
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcf93072ca0833cb24ba6719796f58df56384c3b
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Luo Chen <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: Xikui Wang <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>

Reply via email to