dengzhhu653 commented on code in PR #6585:
URL: https://github.com/apache/hive/pull/6585#discussion_r3548146864


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/metastore/RawStoreBundle.java:
##########
@@ -43,4 +43,8 @@ public RawStore getBaseStore() {
   public PersistenceManager getPersistentManager() {
     return pm;
   }
+
+  protected <T> T siblingStore(Class<T> iface) {

Review Comment:
   This method is a protected method that should be used in the child store 
only, as of now every method in sub-stores opens a transaction, so using the 
sibling store shares the same transaction context as the parent caller.
   
   Even if we use the sibling store outside of current transaction thread, the 
`TransactionHandler` takes care of the transaction management and query 
releasing, it shouldn't have leaking problems, this is, we can call 
`ObjectStore.unwrap` anywhere at whenever as long as ObjectStore treated as 
thread-safe. 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to