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]>
  • Loading branch information
Apache9 committed Aug 9, 2019
1 parent 2debf0f commit 2435473
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,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 2435473

Please sign in to comment.