[ https://issues.apache.org/jira/browse/HIVE-27319?focusedWorklogId=861079&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-861079 ]
ASF GitHub Bot logged work on HIVE-27319: ----------------------------------------- Author: ASF GitHub Bot Created on: 08/May/23 20:50 Start Date: 08/May/23 20:50 Worklog Time Spent: 10m Work Description: saihemanth-cloudera commented on code in PR #4299: URL: https://github.com/apache/hive/pull/4299#discussion_r1187886173 ########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ExceptionHandler.java: ########## @@ -127,7 +128,7 @@ public ExceptionHandler toMetaExceptionIfInstance(String message, Class<?>... cl */ public static void rethrowException(Exception e) throws TException { throw handleException(e) - .throwIfInstance(MetaException.class, NoSuchObjectException.class) + .throwIfInstance(MetaException.class, NoSuchObjectException.class, InvalidObjectException.class) Review Comment: The reason why I explicitly changed this definition is that the HMS server should always throw the right exception to the client. If the InvalidObjectException is not declared in the HMS APIs then we should do so thereby letting know the client about the underlying cause. If we are disguising the InvalidObjectException in the form of MetaException, then I think we are throwing the incorrect exception. Do you still think we need to modify the way we throw the exception in get_partition_by_names_req() API instead of changing it globally? Issue Time Tracking ------------------- Worklog Id: (was: 861079) Time Spent: 1h (was: 50m) > HMS server should throw InvalidObjectException in get_partitions_by_names() > when the table is missing/dropped > ------------------------------------------------------------------------------------------------------------- > > Key: HIVE-27319 > URL: https://issues.apache.org/jira/browse/HIVE-27319 > Project: Hive > Issue Type: Bug > Components: Hive, Standalone Metastore > Reporter: Sai Hemanth Gantasala > Assignee: Sai Hemanth Gantasala > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > When the table object is dropped by a concurrent thread, the > get_partitions_by_names_req() API is currently throwing a > TApplicationException to the client. Instead, the HMS server should propagate > the InvalidObjectException thrown by getTable() to the HMS client. By doing > this, other services using HMS client will understand the exception better. -- This message was sent by Atlassian Jira (v8.20.10#820010)