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

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


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 7eafdb4c12d [branch-2.0][fix](broker) fix broker writer close issue 
(#33110)
7eafdb4c12d is described below

commit 7eafdb4c12d2eedbe5aca431912ac7bd5c5594c9
Author: Mingyu Chen <morning...@163.com>
AuthorDate: Tue Apr 2 10:26:08 2024 +0800

    [branch-2.0][fix](broker) fix broker writer close issue (#33110)
    
    the broker writer may be closed even it is not opened yet.
    If the broker writer is not opened, the fd is empty, the close will fail.
    So check the open status of broker writer before closing it.
    
    Also add kerberos debug options for broker process.
---
 be/src/io/fs/broker_file_writer.cpp               | 2 +-
 fs_brokers/apache_hdfs_broker/bin/start_broker.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/io/fs/broker_file_writer.cpp 
b/be/src/io/fs/broker_file_writer.cpp
index a46d22e1505..d22b9f4c89c 100644
--- a/be/src/io/fs/broker_file_writer.cpp
+++ b/be/src/io/fs/broker_file_writer.cpp
@@ -75,7 +75,7 @@ inline const std::string& client_id(ExecEnv* env, const 
TNetworkAddress& addr) {
 #endif
 
 Status BrokerFileWriter::close() {
-    if (_closed) {
+    if (_closed || !_opened) {
         return Status::OK();
     }
     _closed = true;
diff --git a/fs_brokers/apache_hdfs_broker/bin/start_broker.sh 
b/fs_brokers/apache_hdfs_broker/bin/start_broker.sh
index b6511332a61..c40c8f77f7f 100755
--- a/fs_brokers/apache_hdfs_broker/bin/start_broker.sh
+++ b/fs_brokers/apache_hdfs_broker/bin/start_broker.sh
@@ -63,7 +63,7 @@ PID_DIR="$(
 )"
 export PID_DIR
 
-export JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8"
+export JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8 
-Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true"
 export BROKER_LOG_DIR="${BROKER_HOME}/log"
 # java
 if [[ -z "${JAVA_HOME}" ]]; then


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

Reply via email to