Skip to content

Commit c5c7670

Browse files
committed
Fix push usage
1 parent 331041c commit c5c7670

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/main/java/org/apache/accumulo/core/fate/accumulo/AccumuloStore.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ public void push(Repo<T> repo) throws StackOverflowException {
259259
throw new StackOverflowException("Repo stack size too large");
260260
}
261261

262-
// FateMutator<T> fateMutator = newMutator(fateId).requireStatus(TStatus.IN_PROGRESS);
263-
FateMutator<T> fateMutator = newMutator(fateId);
262+
FateMutator<T> fateMutator =
263+
newMutator(fateId).requireStatus(TStatus.IN_PROGRESS, TStatus.NEW);
264264
fateMutator.putRepo(top.map(t -> t + 1).orElse(1), repo).mutate();
265265
}
266266

test/src/main/java/org/apache/accumulo/test/fate/accumulo/FateStoreIT.java

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ protected void testReadWrite(FateStore<TestEnv> store, ServerContext sctx)
8888
// Try setting a second test op to test getStack()
8989
// when listing or popping TestOperation2 should be first
9090
assertEquals(1, txStore.getStack().size());
91+
txStore.setStatus(TStatus.IN_PROGRESS);
9192
txStore.push(new TestOperation2());
9293
// test top returns TestOperation2
9394
ReadOnlyRepo<TestEnv> top = txStore.top();

0 commit comments

Comments
 (0)