You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/07/10 12:42:50 UTC

[incubator-doris] branch master updated: [Bug][Broker] Fix bug that the error exception is not caught when closing the broker writer (#4034)

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

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 3fcbb64  [Bug][Broker] Fix bug that the error exception is not caught when closing the broker writer (#4034)
3fcbb64 is described below

commit 3fcbb646f6d9decb7fb3dcfefc492d6f6f0c4320
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Fri Jul 10 20:42:39 2020 +0800

    [Bug][Broker] Fix bug that the error exception is not caught when closing the broker writer (#4034)
    
    Broker should return the error status.
    Fix #4033
---
 .../src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java b/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
index 4bc48fd..206e909 100644
--- a/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
+++ b/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
@@ -586,6 +586,8 @@ public class FileSystemManager {
                 fsDataInputStream.close();
             } catch (IOException e) {
                 logger.error("errors while close file input stream", e);
+                throw new BrokerException(TBrokerOperationStatusCode.TARGET_STORAGE_SERVICE_ERROR,
+                        e, "errors while close file input stream");
             } finally {
                 clientContextManager.removeInputStream(fd);
             }
@@ -645,6 +647,8 @@ public class FileSystemManager {
                 fsDataOutputStream.close();
             } catch (IOException e) {
                 logger.error("errors while close file output stream", e);
+                throw new BrokerException(TBrokerOperationStatusCode.TARGET_STORAGE_SERVICE_ERROR,
+                        e, "errors while close file output stream");
             } finally {
                 clientContextManager.removeOutputStream(fd);
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org