virajjasani commented on code in PR #6789:
URL: https://github.com/apache/hbase/pull/6789#discussion_r2032177625
##########
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);
Review Comment:
> Or alternatively revert to the original format - the method was 60 lines
which isn't extremely long relatively speaking...
+1 to this. The refactor is good but it would look better as separate PR for
the change tracking purpose, specifically helps when we refactor critical piece
of the code.
--
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]