asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luoc...@apache.org
Subject asterixdb git commit: [ASTERIXDB-2299] Set log type properly during modifications
Date Mon, 26 Feb 2018 01:09:09 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 48e3dce36 -> 7ec813cc5


[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>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/7ec813cc
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/7ec813cc
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/7ec813cc

Branch: refs/heads/master
Commit: 7ec813cc57a34b0e190e0cb22ef2a0e99541e9d8
Parents: 48e3dce
Author: luochen01 <cluo8@uci.edu>
Authored: Sun Feb 25 15:33:15 2018 -0800
Committer: Luo Chen <cluo8@uci.edu>
Committed: Sun Feb 25 17:08:06 2018 -0800

----------------------------------------------------------------------
 .../opcallbacks/PrimaryIndexModificationOperationCallback.java     | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ec813cc/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java
----------------------------------------------------------------------
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 @@ public class PrimaryIndexModificationOperationCallback extends AbstractIndexModi
         logRecord.setLogType(LogType.WAIT);
         logRecord.computeAndSetLogSize();
         txnSubsystem.getLogManager().log(logRecord);
+        // set the log type back to UPDATE for normal updates
+        logRecord.setLogType(LogType.UPDATE);
     }
 }


Mime
View raw message