TranslogTests#commit didn't allow for a concurrent closing of a view
The view closing will trim unneeded files but there is a small window where they may still be around.
This commit is contained in:
parent
7182577904
commit
9b8754e4c2
|
@ -159,7 +159,8 @@ public class TranslogTests extends ESTestCase {
|
||||||
if (deletionPolicy.pendingViewsCount() == 0) {
|
if (deletionPolicy.pendingViewsCount() == 0) {
|
||||||
assertThat(deletionPolicy.minTranslogGenRequired(), equalTo(genToCommit));
|
assertThat(deletionPolicy.minTranslogGenRequired(), equalTo(genToCommit));
|
||||||
}
|
}
|
||||||
assertThat(translog.getMinFileGeneration(), equalTo(deletionPolicy.minTranslogGenRequired()));
|
// we may have some views closed concurrently causing the deletion policy to increase it's minTranslogGenRequired
|
||||||
|
assertThat(translog.getMinFileGeneration(), lessThanOrEqualTo(deletionPolicy.minTranslogGenRequired()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue