github-actions[bot] commented on code in PR #41994:
URL: https://github.com/apache/doris/pull/41994#discussion_r1803463119


##########
be/src/http/http_headers.cpp:
##########
@@ -94,5 +94,6 @@ const char* HttpHeaders::WEBSOCKET_PROTOCOL = 
"WebSocket-Protocol";
 const char* HttpHeaders::WWW_AUTHENTICATE = "WWW-Authenticate";
 
 const std::string HttpHeaders::JsonType = "application/json";
+const std::string HttpHeaders::AUTH_TOKEN = "Auth-Token";

Review Comment:
   warning: no member named 'AUTH_TOKEN' in 'doris::HttpHeaders' 
[clang-diagnostic-error]
   ```cpp
   const std::string HttpHeaders::AUTH_TOKEN = "Auth-Token";
                                  ^
   ```
   



##########
be/src/agent/heartbeat_server.cpp:
##########
@@ -275,6 +275,17 @@ Status HeartbeatServer::_heartbeat(const TMasterInfo& 
master_info) {
         LOG(INFO) << "set config cloud_unique_id " << 
master_info.cloud_unique_id << " " << st;
     }
 
+    if (master_info.__isset.curr_auth_token) {
+        if (!_master_info->__isset.curr_auth_token) {
+            _master_info->__set_curr_auth_token(master_info.auth_token);
+            LOG(INFO) << "set new auth token: " << _current_auth_token;
+        } else if (_master_info->curr_auth_token != master_info.auth_token)
+            _master_info->__set_last_auth_token(_master_info->curr_auth_token);

Review Comment:
   warning: statement should be inside braces 
[readability-braces-around-statements]
   
   ```suggestion
           } else if (_master_info->curr_auth_token != master_info.auth_token) {
               
_master_info->__set_last_auth_token(_master_info->curr_auth_token);
   }
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to