keith-turner commented on code in PR #4242:
URL: https://github.com/apache/accumulo/pull/4242#discussion_r1489594958
##########
core/src/main/java/org/apache/accumulo/core/fate/accumulo/AccumuloStore.java:
##########
@@ -259,7 +259,8 @@ public void push(Repo<T> repo) throws
StackOverflowException {
throw new StackOverflowException("Repo stack size too large");
}
- FateMutator<T> fateMutator = newMutator(fateId);
+ FateMutator<T> fateMutator =
+ newMutator(fateId).requireStatus(TStatus.IN_PROGRESS, TStatus.NEW);
Review Comment:
Should not push to something with a NEW status, when something is NEW its
never been seeded with an operation. Was something failing w/o NEW?
```suggestion
newMutator(fateId).requireStatus(TStatus.IN_PROGRESS);
```
##########
core/src/main/java/org/apache/accumulo/core/fate/accumulo/AccumuloStore.java:
##########
@@ -268,7 +269,9 @@ public void pop() {
verifyReserved(true);
Optional<Integer> top = findTop();
- top.ifPresent(t -> newMutator(fateId).deleteRepo(t).mutate());
+ top.ifPresent(t -> newMutator(fateId)
+ .requireStatus(TStatus.FAILED_IN_PROGRESS, TStatus.SUCCESSFUL,
TStatus.FAILED)
Review Comment:
Ideally we would only pop when something has a status of FAILED_IN_PROGRESS.
Do you know if this change would cause test failures?
```suggestion
.requireStatus(TStatus.FAILED_IN_PROGRESS)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]