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 constructor 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.



-- 
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]

Reply via email to