apurtell commented on a change in pull request #2574:
URL: https://github.com/apache/hbase/pull/2574#discussion_r512957365



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -4569,13 +4665,29 @@ private void doMiniBatchMutate(BatchOperation<?> 
batchOp) throws IOException {
       // We should record the timestamp only after we have acquired the 
rowLock,
       // otherwise, newer puts/deletes/increment/append are not guaranteed to 
have a newer
       // timestamp
+
+      // Check for thread interrupt status in case we have been signaled from
+      // #interruptRegionOperation.
+      checkInterrupt();
+
       long now = EnvironmentEdgeManager.currentTime();
       batchOp.prepareMiniBatchOperations(miniBatchOp, now, acquiredRowLocks);
 
       // STEP 3. Build WAL edit
+
+      // Check for thread interrupt status in case we have been signaled from
+      // #interruptRegionOperation.
+      checkInterrupt();
+
       List<Pair<NonceKey, WALEdit>> walEdits = 
batchOp.buildWALEdits(miniBatchOp);
 
       // STEP 4. Append the WALEdits to WAL and sync.
+
+      // Check for thread interrupt status in case we have been signaled from
+      // #interruptRegionOperation. This is the last place we can do it 
"safely" before
+      // WAL appends.
+      checkInterrupt();
+

Review comment:
       @Reidddddd I would agree checking beyond WAL sync would be useful if and 
only if we decide to protect WAL syncs from interrupts. Otherwise the sync will 
be interrupted and we will break out of the RPC processing with an IOException 
with cause InterruptedException (from the WAL sync future). 




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to