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

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


The following commit(s) were added to refs/heads/master by this push:
     new 3888a7cc0be [fix](group_commit) Fix check auth error when relaying wal 
(#29461)
3888a7cc0be is described below

commit 3888a7cc0bed20f29db79e88ad1bb4115584920b
Author: huanghaibin <[email protected]>
AuthorDate: Wed Jan 3 23:19:16 2024 +0800

    [fix](group_commit) Fix check auth error when relaying wal (#29461)
---
 be/src/http/action/http_stream.cpp | 4 +++-
 be/src/olap/wal/wal_table.cpp      | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/be/src/http/action/http_stream.cpp 
b/be/src/http/action/http_stream.cpp
index f1017703570..ef93453cb04 100644
--- a/be/src/http/action/http_stream.cpp
+++ b/be/src/http/action/http_stream.cpp
@@ -292,12 +292,14 @@ void 
HttpStreamAction::free_handler_ctx(std::shared_ptr<void> param) {
 Status HttpStreamAction::process_put(HttpRequest* http_req,
                                      std::shared_ptr<StreamLoadContext> ctx) {
     TStreamLoadPutRequest request;
-    set_request_auth(&request, ctx->auth);
     if (http_req != nullptr) {
         request.__set_load_sql(http_req->header(HTTP_SQL));
     } else {
+        request.__set_token(ctx->auth.token);
         request.__set_load_sql(ctx->sql_str);
+        ctx->auth.token = "";
     }
+    set_request_auth(&request, ctx->auth);
     request.__set_loadId(ctx->id.to_thrift());
     request.__set_label(ctx->label);
     if (ctx->group_commit) {
diff --git a/be/src/olap/wal/wal_table.cpp b/be/src/olap/wal/wal_table.cpp
index f89794a4586..b3c8f965414 100644
--- a/be/src/olap/wal/wal_table.cpp
+++ b/be/src/olap/wal/wal_table.cpp
@@ -278,8 +278,9 @@ Status WalTable::_handle_stream_load(int64_t wal_id, const 
std::string& wal,
     std::shared_ptr<StreamLoadContext> ctx = 
std::make_shared<StreamLoadContext>(_exec_env);
     ctx->sql_str = sql_str;
     ctx->wal_id = wal_id;
-    ctx->auth.auth_code = wal_id;
     ctx->label = label;
+    ctx->auth.token = "relay_wal"; // this is a fake, fe not check it now
+    ctx->auth.user = "admin";
     auto st = _http_stream_action->process_put(nullptr, ctx);
     if (st.ok()) {
         // wait stream load finish


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to