hgromer commented on code in PR #7084:
URL: https://github.com/apache/hbase/pull/7084#discussion_r2137626214
##########
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:
Alternatively, maybe a less confusing option would be to return a non-static
value for `holdLock` in `SnapshotProcedure`
This forces you to manage additional state at each stage though, which I why
I opted for this implementation which I thought was safer
--
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]