mnpoonia commented on code in PR #6789:
URL: https://github.com/apache/hbase/pull/6789#discussion_r2028173064
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java:
##########
@@ -8408,42 +8423,21 @@ public void startRegionOperation() throws IOException {
@Override
public void startRegionOperation(Operation op) throws IOException {
- boolean isInterruptableOp = false;
- switch (op) {
- case GET: // interruptible read operations
- case SCAN:
- isInterruptableOp = true;
- checkReadsEnabled();
- break;
- case INCREMENT: // interruptible write operations
- case APPEND:
- case PUT:
- case DELETE:
- case BATCH_MUTATE:
- case CHECK_AND_MUTATE:
- isInterruptableOp = true;
- break;
- default: // all others
- break;
- }
- if (
- op == Operation.MERGE_REGION || op == Operation.SPLIT_REGION || op ==
Operation.COMPACT_REGION
- || op == Operation.COMPACT_SWITCH
- ) {
- // split, merge or compact region doesn't need to check the
closing/closed state or lock the
- // region
- return;
- }
+ boolean isInterruptibleOp = isOperationInterruptible(op);
+ if (!shouldLock(op)) return;
Review Comment:
I feel this has improved readibility but i am fine if someone wants to
revert this.
--
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]