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 <openinx@gmail.com>
  • Loading branch information
Apache9 committed Jul 13, 2019
1 parent b6e6669 commit 3eda33a
Showing 1 changed file with 5 additions and 1 deletion.
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 3eda33a

Please sign in to comment.