diff --git a/be/src/common/utils.h b/be/src/common/utils.h index a4d2d2aa6329ef..8376fe38a68e67 100644 --- a/be/src/common/utils.h +++ b/be/src/common/utils.h @@ -34,7 +34,11 @@ template void set_request_auth(T* req, const AuthInfo& auth) { if (auth.auth_code != -1) { // if auth_code is set, no need to set other info - req->auth_code = auth.auth_code; + req->__set_auth_code(auth.auth_code); + // user name and passwd is unused, but they are required field. + // so they have to be set. + req->user = ""; + req->passwd = ""; } else { req->user = auth.user; req->passwd = auth.passwd;