You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by za...@apache.org on 2023/04/14 14:51:36 UTC

[hive] branch master updated: HIVE-27217: Rethrow unhandled exception in addWriteNotificationLogInBatch (John Sherman reviewed by Stephen Carlin, Stamatis Zampetakis)

This is an automated email from the ASF dual-hosted git repository.

zabetak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new c213e288630 HIVE-27217: Rethrow unhandled exception in addWriteNotificationLogInBatch (John Sherman reviewed by Stephen Carlin, Stamatis Zampetakis)
c213e288630 is described below

commit c213e288630061b46b6eec4299bb668c8bfcced0
Author: John Sherman <jf...@cloudera.com>
AuthorDate: Tue Apr 4 10:08:42 2023 -0700

    HIVE-27217: Rethrow unhandled exception in addWriteNotificationLogInBatch (John Sherman reviewed by Stephen Carlin, Stamatis Zampetakis)
    
    It is not a good choice to swallow the exception. A missing write
    notification will affect various systems such as event notification and
    replication. It is much preferable to fail and make it visible so a
    user can take action (either by checking HMS logs, making sure HMS
    connectivity is good, etc) rather than having to figure out why the
    notification log is missing entries long after the fact.
    
    This is likely an oversight when attempting the fallback mechanism
    rather than a purposeful choice to ignore these exceptions.
    
    Closes #4197
---
 ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
index f8e844e67b2..d26b65ff350 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
@@ -3388,6 +3388,10 @@ private void constructOneLBLocationMap(FileStatus fSta,
           get(conf).getSynchronizedMSC().addWriteNotificationLog(request);
         }
         supported = false;
+      } else {
+	// Rethrow the exception, so failures are visible. Missing a write notification can be very difficult
+	// to debug otherwise.
+	throw e;
       }
     }
     long end = System.currentTimeMillis();