Apache9 commented on code in PR #6979:
URL: https://github.com/apache/hbase/pull/6979#discussion_r2082929311


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/procedure2/store/region/RegionProcedureStore.java:
##########
@@ -304,20 +301,6 @@ private void serializeDelete(long procId, List<Mutation> 
mutations, List<byte[]>
     rowsToLock.add(row);
   }
 
-  /**
-   * Insert procedure may be called by master's rpc call. There are some check 
about the rpc call
-   * when mutate region. Here unset the current rpc call and set it back in 
finally block. See
-   * HBASE-23895 for more details.
-   */
-  private void runWithoutRpcCall(Runnable runnable) {
-    Optional<RpcCall> rpcCall = RpcServer.unsetCurrentCall();
-    try {
-      runnable.run();
-    } finally {
-      rpcCall.ifPresent(RpcServer::setCurrentCall);
-    }
-  }

Review Comment:
   This is for resetting the call context. 
`rpcCall.ifPresent(RpcServer::setCurrentCall);`
   
   Since it is not always called within a rpc call, the `rpcCall` is an 
Optional, we will only call RpcServer.setCurrentCall when the Optional contains 
a real RpcCall.



-- 
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: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to