Remove uncommitted ops assertion in shouldFlush

This assertion does not hold if engine is flushed between the invocation
of translog.uncommittedSizeInBytes and translog.uncommittedOperations.
These two values can be calculated from different commits.
This commit is contained in:
Nhat Nguyen 2018-02-01 18:20:56 -05:00
parent 3035f0b2f3
commit 5be478f938
1 changed files with 0 additions and 2 deletions

View File

@ -1470,8 +1470,6 @@ public class InternalEngine extends Engine {
if (uncommittedSizeOfCurrentCommit < flushThreshold) {
return false;
}
assert translog.uncommittedOperations() > 0 : "translog required to flush periodically but not contain any uncommitted operation; "
+ "uncommitted translog size [" + uncommittedSizeOfCurrentCommit + "], flush threshold [" + flushThreshold + "]";
/*
* We should only flush ony if the shouldFlush condition can become false after flushing.
* This condition will change if the `uncommittedSize` of the new commit is smaller than