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 committed Jul 13, 2019
1 parent 24387a6 commit b850622
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 b850622

Please sign in to comment.