[ https://issues.apache.org/jira/browse/HIVE-25892?focusedWorklogId=714277&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-714277 ]
ASF GitHub Bot logged work on HIVE-25892: ----------------------------------------- Author: ASF GitHub Bot Created on: 25/Jan/22 08:26 Start Date: 25/Jan/22 08:26 Worklog Time Spent: 10m Work Description: dengzhhu653 commented on pull request #2967: URL: https://github.com/apache/hive/pull/2967#issuecomment-1020924354 > Could we provide a way to clear the context? In Iceberg we create a HMS instance for our tests, and because of the threadlocals here and in the TxnHandler we leak information between the tests. Add a [CleanupHook](https://github.com/apache/hive/blob/c8c6152b79810276ac070ec057b0643b9ce3b03f/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandlerContext.java#L170-L172) here to clear the locals by calling HMSHandlerContext#clear(CleanupHook cleanupHook), not sure it enough for the iceberg case. -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 714277) Time Spent: 0.5h (was: 20m) > Group HMSHandler's thread locals into a single context > ------------------------------------------------------ > > Key: HIVE-25892 > URL: https://issues.apache.org/jira/browse/HIVE-25892 > Project: Hive > Issue Type: Improvement > Components: Standalone Metastore > Reporter: Zhihua Deng > Priority: Minor > Labels: pull-request-available > Time Spent: 0.5h > Remaining Estimate: 0h > > There are more than six ThreadLocal variables in HMSHandler, we can group > them together into a single context to improve the management of variables > and the code readability. > -- This message was sent by Atlassian Jira (v8.20.1#820001)