commit | 7ec813cc57a34b0e190e0cb22ef2a0e99541e9d8 | [log] [tgz] |
---|---|---|
author | luochen01 <cluo8@uci.edu> | Sun Feb 25 15:33:15 2018 -0800 |
committer | Luo Chen <cluo8@uci.edu> | Sun Feb 25 17:08:06 2018 -0800 |
tree | a28b5d2a362d18d84a583e0eff771c921ee36355 | |
parent | 48e3dce36d08a079e90986e7ff28c87893b5b1bb [diff] |
[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); } }