zhannngchen commented on code in PR #50173:
URL: https://github.com/apache/doris/pull/50173#discussion_r2076745001


##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1821,6 +1821,30 @@ static bool use_new_version_random() {
     return false;
 }
 
+void MetaServiceImpl::check_version(std::string& use_version, std::string& 
instance_id) {
+    if (config::use_delete_bitmap_lock_random_version && 
!use_new_version_random()) {
+        use_version = "v1";
+        return;
+    }
+    std::string white_list = config::delete_bitmap_lock_version_white_list;
+    if (!white_list.empty()) {
+        auto white_list_vector = split(white_list, ';');
+        for (auto& item : white_list_vector) {
+            auto v = split(item, ':');
+            if (v.size() != 2) {
+                LOG(WARNING) << "failed to split config=" << item << ",white 
list=" << white_list;
+                continue;
+            }
+            trim(v[0]);
+            trim(v[1]);
+            if (instance_id == v[0]) {
+                use_version = v[1];

Review Comment:
   Ensure the parameter value is valid



##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1821,6 +1821,30 @@ static bool use_new_version_random() {
     return false;
 }
 
+void MetaServiceImpl::check_version(std::string& use_version, std::string& 
instance_id) {
+    if (config::use_delete_bitmap_lock_random_version && 
!use_new_version_random()) {
+        use_version = "v1";
+        return;
+    }
+    std::string white_list = config::delete_bitmap_lock_version_white_list;

Review Comment:
   If each RPC call requires parsing, the overhead can be quite high.



##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -2432,26 +2455,10 @@ static bool 
put_delete_bitmap_update_lock_key(MetaServiceCode& code, std::string
 void MetaServiceImpl::get_delete_bitmap_update_lock_v2(
         google::protobuf::RpcController* controller,
         const GetDeleteBitmapUpdateLockRequest* request,
-        GetDeleteBitmapUpdateLockResponse* response, 
::google::protobuf::Closure* done) {
+        GetDeleteBitmapUpdateLockResponse* response, 
::google::protobuf::Closure* done,
+        std::string& instance_id, MetaServiceCode& code, std::string& msg, 
std::stringstream& ss) {

Review Comment:
   the new added parameters seems not used?



-- 
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