Skip to content

Commit

Permalink
TEST: init unassigned gcp in testAcquireIndexCommit
Browse files Browse the repository at this point in the history
The global checkpoint should be assigned to unassigned rather than 0. If
a single document is indexed and the global checkpoint is initialized
with 0, the first commit is safe which the test does not suppose.

Relates #28038
  • Loading branch information
dnhatn committed Jan 13, 2018
1 parent 095f31b commit 82722eb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4324,7 +4324,7 @@ public void testConcurrentAppendUpdateAndRefresh() throws InterruptedException,
public void testAcquireIndexCommit() throws Exception {
IOUtils.close(engine, store);
store = createStore();
final AtomicLong globalCheckpoint = new AtomicLong();
final AtomicLong globalCheckpoint = new AtomicLong(SequenceNumbers.UNASSIGNED_SEQ_NO);
try (InternalEngine engine = createEngine(store, createTempDir(), globalCheckpoint::get)) {
int numDocs = between(1, 20);
for (int i = 0; i < numDocs; i++) {
Expand Down

0 comments on commit 82722eb

Please sign in to comment.