SWJTU-ZhangLei commented on code in PR #55035:
URL: https://github.com/apache/doris/pull/55035#discussion_r2289772926


##########
cloud/src/meta-service/txn_lazy_committer.cpp:
##########
@@ -541,12 +541,21 @@ void TxnLazyCommitTask::commit() {
             // <partition_id, tmp_rowsets>
             std::map<int64_t, std::vector<std::pair<std::string, 
doris::RowsetMetaCloudPB>>>
                     partition_to_tmp_rowset_metas;
+            size_t max_rowset_meta_size = 0;
             for (auto& [tmp_rowset_key, tmp_rowset_pb] : all_tmp_rowset_metas) 
{
                 
partition_to_tmp_rowset_metas[tmp_rowset_pb.partition_id()].emplace_back();
                 
partition_to_tmp_rowset_metas[tmp_rowset_pb.partition_id()].back().first =
                         tmp_rowset_key;
                 
partition_to_tmp_rowset_metas[tmp_rowset_pb.partition_id()].back().second =
                         tmp_rowset_pb;
+                max_rowset_meta_size = std::max(max_rowset_meta_size, 
tmp_rowset_pb.ByteSizeLong());
+            }
+
+            // fdb txn limit 10MB, we use 4MB as the max size for each batch.
+            size_t max_rowsets_per_batch = 
config::txn_lazy_max_rowsets_per_batch;
+            if (max_rowset_meta_size > 0) {

Review Comment:
   > `4L << 20 / max_rowset_meta_size` 这个表达是是错的 应该会先算 除法 再移位 . 这里最好加个syncpoint 
用来观察 实际 max_rowset_meta_size 是多少, 在单测里通通过 syncpoint来 check 它的值
   
   done



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