commit | c02cf81c7e3579ab65018a4eeff39110e7d2d28c | [log] [tgz] |
---|---|---|
author | Yingyi Bu <yingyi@couchbase.com> | Wed Nov 02 01:23:24 2016 -0700 |
committer | Yingyi Bu <buyingyi@gmail.com> | Wed Nov 02 08:27:23 2016 -0700 |
tree | b9d1e89d18ced9a73894980bd3448a89c6cf7339 | |
parent | e2e3ab564b8993f84886663acbd7490a3b0499bc [diff] |
Fix a mutual waiting condition during switching the txn log file: -- LogManager waits for LogBuffer to flush, -- LogBuffer is not full and cannot flush. Change-Id: I7bf7b70675ab68005e581a296ac4f4515f1d5ad4 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1333 Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu> Reviewed-by: Michael Blow <mblow@apache.org>
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java index 947ebc7..814bcfc 100644 --- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java +++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/logging/LogManager.java
@@ -203,6 +203,8 @@ } protected void prepareNextLogFile() { + // Make sure to flush whatever left in the log tail. + appendPage.isFull(true); //wait until all log records have been flushed in the current file synchronized (flushLSN) { try {