hgromer commented on code in PR #7084: URL: https://github.com/apache/hbase/pull/7084#discussion_r2137612634
########## hbase-procedure/src/main/java/org/apache/hadoop/hbase/procedure2/ProcedureSuspendedException.java: ########## @@ -35,5 +38,21 @@ public ProcedureSuspendedException() { */ public ProcedureSuspendedException(String s) { super(s); + shouldForceLockRelease = false; + } + + /** + * Constructor + * @param s message + * @param shouldForceLockRelease if true, the procedure will release the lock regardless of + * {@link Procedure#holdLock(Object)} + */ + public ProcedureSuspendedException(String s, boolean shouldForceLockRelease) { + super(s); + this.shouldForceLockRelease = shouldForceLockRelease; + } + + public boolean shouldForceLockRelease() { Review Comment: I don't think we should. If we did, we'd have potential inconsistencies. As I mention in my comment, this bypass allows us to release the lock _prior_ to us actually snapshotting any data. Once we start snapshotting (anything in at or past SNAPSHOT_SNAPSHOT_ONLINE_REGIONS) it is unsafe to release the lock. I think the comment still holds. We want to avoid enabling/disabling/modifying/deleting a table during a snapshot. The procedure suspension occurs prior to us starting to snapshot any data, at SNAPSHOT_WRITE_SNAPSHOT_INFO. -- 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: issues-unsubscr...@hbase.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org