hgromer commented on PR #7084:
URL: https://github.com/apache/hbase/pull/7084#issuecomment-2959311914

   > Another option, which is simpler to reason about, is to simply fail the 
`SnapshotProcedure` if the table isn't in a state it can handle. This was my 
approach in [HBASE-29315](https://issues.apache.org/jira/browse/HBASE-29315), 
for the exact same reasons you're encountering here. I couldn't usefully 
"sleep" a `SplitTableRegionProcedure` because it used holdLock=true. I think it 
would be good to agree on a standard of what to do in these situations.
   > 
   > Failing a procedure is simpler and doesn't introduce more edge cases in 
the procedure executor state machine. However, obviously, it's a better user 
experience if your procedures get executed eventually.
   
   Agreed. The reason I opted for supsending the procedure is because this is 
already something we do if [we are splitting or merging 
regions](https://github.com/apache/hbase/blob/a71288f2e2fe3f0b3fe254ca9a1174ce42e72d6a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/SnapshotProcedure.java#L241).
 So this procedure will already suspend and resume in the case the table state 
isn't optimal. 
   
   I don't think I have a very strong opinion one way or another, though. 
Enabling/disabling tables happens often enough that it might be fine to simply 
fail and force the user to manually handle the failure. 


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