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 95cdf12 commit 326fa1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4342,7 +4342,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 326fa1c

Please sign in to comment.