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


##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1851,25 +1851,36 @@ void 
MetaServiceImpl::update_delete_bitmap(google::protobuf::RpcController* cont
     }
 
     // 4. Update delete bitmap for curent txn
-    size_t total_key = 0;
-    size_t total_size = 0;
+    size_t current_key_count = 0;
+    size_t current_value_count = 0;
+    size_t total_key_count = 0;
+    size_t total_value_count = 0;
     for (size_t i = 0; i < request->rowset_ids_size(); ++i) {
         auto& key = delete_bitmap_keys.delete_bitmap_keys(i);
         auto& val = request->segment_delete_bitmaps(i);
 
         // Split into multiple fdb transactions, because the size of one fdb
-        // transaction can't exceed 10MB.
-        if (fdb_txn_size + key.size() + val.size() > 9 * 1024 * 1024) {
-            LOG(INFO) << "fdb txn size more than 9MB, current size: " << 
fdb_txn_size
+        // transaction can't exceed 10MB.In my test, when 
txn->approximate_bytes()
+        // bigger than 8.3MB, it will meet Transaction exceeds byte limit 
error.
+        if (txn->approximate_bytes() + key.size() * 3 + val.size() > 
config::max_txn_commit_byte) {
+            LOG(INFO) << "fdb txn size more than " << 
config::max_txn_commit_byte
+                      << ", current size: " << txn->approximate_bytes()
                       << " lock_id=" << request->lock_id();
+            LOG(INFO) << "update delete bitmap tablet_id=" << tablet_id

Review Comment:
   we only need such log on error



##########
cloud/src/meta-service/meta_service.cpp:
##########
@@ -1888,14 +1899,19 @@ void 
MetaServiceImpl::update_delete_bitmap(google::protobuf::RpcController* cont
         }
         // splitting large values (>90*1000) into multiple KVs
         cloud::put(txn.get(), key, val, 0);
-        fdb_txn_size = fdb_txn_size + key.size() + val.size();
-        total_key++;
-        total_size += key.size() + val.size();
+        current_key_count++;
+        current_value_count += val.size();
+        total_key_count++;
+        total_value_count += val.size();
         VLOG_DEBUG << "xxx update delete bitmap put delete_bitmap_key=" << 
hex(key)
                    << " lock_id=" << request->lock_id() << " key_size: " << 
key.size()
                    << " value_size: " << val.size();
     }
-
+    LOG(INFO) << "update delete bitmap tablet_id=" << tablet_id << " lock_id=" 
<< request->lock_id()

Review Comment:
   ditto



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to