[ https://issues.apache.org/jira/browse/HIVE-26036?focusedWorklogId=745126&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-745126 ]
ASF GitHub Bot logged work on HIVE-26036: ----------------------------------------- Author: ASF GitHub Bot Created on: 21/Mar/22 14:23 Start Date: 21/Mar/22 14:23 Worklog Time Spent: 10m Work Description: marton-bod commented on a change in pull request #3104: URL: https://github.com/apache/hive/pull/3104#discussion_r831165554 ########## File path: standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java ########## @@ -393,6 +393,14 @@ public void testPartitionOps() throws Exception { try (AutoCloseable c = deadline()) { objectStore.addPartition(part2); } + List<String> value3 = Arrays.asList("US", "MA"); Review comment: Can you add test cases for the other changed API methods too? Maybe create a new method for them, e.g. `testPartitionOpsWhenTableDoesNotExist`? This test method already seems quite messy and cluttered so maybe it's worth separating it out -- 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: 745126) Time Spent: 40m (was: 0.5h) > NPE caused by getMTable() in ObjectStore > ---------------------------------------- > > Key: HIVE-26036 > URL: https://issues.apache.org/jira/browse/HIVE-26036 > Project: Hive > Issue Type: Bug > Components: Hive > Affects Versions: 3.1.2, 4.0.0 > Reporter: Yu Weiqiang > Assignee: Yu Weiqiang > Priority: Minor > Labels: pull-request-available > Attachments: NPE_From_getMTable.png > > Time Spent: 40m > Remaining Estimate: 0h > > *Issue* > Some api in ObjectStore invoke getMTable() but not check that if the returned > value is null, which caused the NPE, like addPartitions(), addPartition(), > alterPartition() et. > *Reason* > Such api described above will check that whether the table exists in > HMSHandler (first check), but if the table is dropped by other threads after > the first check, the NPE will happen. > The simple idea is that we can check the table each time we get from > getMTable(). > *Stack example* > !NPE_From_getMTable.png! -- This message was sent by Atlassian Jira (v8.20.1#820001)