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 250bca942a1 [fix](jdbc catalog) fix jdbc table sink writer close 
nullptr and add log (#37021)
250bca942a1 is described below

commit 250bca942a118c2f0812e61b8a60a9f7e7de9062
Author: zy-kkk <zhongy...@gmail.com>
AuthorDate: Mon Jul 1 12:31:41 2024 +0800

    [fix](jdbc catalog) fix jdbc table sink writer close nullptr and add log 
(#37021)
    
    fix jdbc table sink writer close nullptr and add log
---
 be/src/vec/sink/vjdbc_table_sink.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/src/vec/sink/vjdbc_table_sink.cpp 
b/be/src/vec/sink/vjdbc_table_sink.cpp
index 2663dc236a1..bb3e1123ac5 100644
--- a/be/src/vec/sink/vjdbc_table_sink.cpp
+++ b/be/src/vec/sink/vjdbc_table_sink.cpp
@@ -112,7 +112,11 @@ Status VJdbcTableSink::close(RuntimeState* state, Status 
exec_status) {
     if (exec_status.ok() && _use_transaction) {
         RETURN_IF_ERROR(_writer->finish_trans());
     }
-    RETURN_IF_ERROR(_writer->close());
+    if (_writer == nullptr) {
+        LOG(WARNING) << "debug invalid nullptr writer when close";
+    } else {
+        RETURN_IF_ERROR(_writer->close());
+    }
     return DataSink::close(state, exec_status);
 }
 } // namespace vectorized


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

Reply via email to