keith-turner commented on code in PR #5016:
URL: https://github.com/apache/accumulo/pull/5016#discussion_r1826140200
##########
core/src/main/java/org/apache/accumulo/core/fate/WrappedFateTxStore.java:
##########
@@ -86,6 +86,12 @@ public void delete() {
wrapped.delete();
}
+ @Override
+ public void forceDelete() {
+ throw new UnsupportedOperationException(
Review Comment:
I like what this trying to do, but its far removed from the code that cares
about this and if the code is refactored then this validation could be lost w/o
anyone realizing it.
The following is a not a great solution, but its a solution. Could pass a
boolean to the WrappedFateTxStore that indicates if forceDelete should be
allowed or not. This boolean could then cascade out to the code that creates
the logging fate store. The boolean would always be false, but it links the
code that really cares about this to this check and would force any
refactorings to consider it.
Another solution is to add a comment exlaining why this throwing unsupported
operation exception.
##########
core/src/main/java/org/apache/accumulo/core/fate/FateStore.java:
##########
@@ -104,6 +104,11 @@ interface FateTxStore<T> extends ReadOnlyFateTxStore<T> {
*/
void delete();
+ /**
+ * Force remove the transaction from the store. Only to be used by {@link
AdminUtil}
Review Comment:
```suggestion
* Force remove the transaction from the store regardless of the status.
Only to be used by {@link AdminUtil}
```
--
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]