HBASE-22681 The 'assert highestUnsyncedTxid < entry.getTxid();' in AbstractFWAL.append may fail when using AsyncFSWAL (#376)
Signed-off-by: Zheng Hu <openinx@gmail.com>
This commit is contained in:
parent
b6e66699a9
commit
3eda33a048
|
@ -439,7 +439,11 @@ public class AsyncFSWAL extends AbstractFSWAL<AsyncWriter> {
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue