Luo Chen has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/2424
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
---
M
asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/opcallbacks/PrimaryIndexModificationOperationCallback.java
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb
refs/changes/24/2424/1
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: newchange
Gerrit-Change-Id: Ibcf93072ca0833cb24ba6719796f58df56384c3b
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Luo Chen <[email protected]>