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 (#376)

Signed-off-by: Zheng Hu <[email protected]>
  • Loading branch information
Apache9 authored Jul 13, 2019
1 parent 9f343c2 commit 032c18f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,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 032c18f

Please sign in to comment.