hgromer commented on code in PR #7084:
URL: https://github.com/apache/hbase/pull/7084#discussion_r2136764338
##########
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:
The Procedure class has a `holdLock` method which returns true for
SnapshotProcedure. This prevents us from releasing the lock even on suspension.
I believe that at the stage where the deadlock could happen, it's safe to
release the lock. We haven't done any snapshotting yet, so I believe there
shouldn't be any weird data inconsistencies from region splits/merges.
--
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]