Skip to content

Commit

Permalink
HBASE-22681 The 'assert highestUnsyncedTxid < entry.getTxid();' in Ab…
Browse files Browse the repository at this point in the history
…stractFWAL.append may fail when using AsyncFSWAL (apache#376)

Signed-off-by: Zheng Hu <[email protected]>
(cherry picked from commit b850622)

Change-Id: Icce057f9b0c86caf6ca07d9f0c2c91f599693019
  • Loading branch information
Apache9 authored and Jenkins committed Jul 13, 2019
1 parent 86b7f2f commit f7e5fd4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,11 @@ private void appendAndSync() {
newHighestProcessedAppendTxid = entry.getTxid();
iter.remove();
if (appended) {
unackedAppends.addLast(entry);
// This is possible, when we fail to sync, we will add the unackedAppends back to
// toWriteAppends, so here we may get an entry which is already in the unackedAppends.
if (unackedAppends.isEmpty() || unackedAppends.peekLast().getTxid() < entry.getTxid()) {
unackedAppends.addLast(entry);
}
if (writer.getLength() - fileLengthAtLastSync >= batchSize) {
break;
}
Expand Down

0 comments on commit f7e5fd4

Please sign in to comment.