Userwhite commented on code in PR #65810:
URL: https://github.com/apache/doris/pull/65810#discussion_r3663389907


##########
be/src/cloud/pb_convert.cpp:
##########
@@ -762,18 +762,7 @@ void doris_tablet_meta_to_cloud(TabletMetaCloudPB* out, 
const TabletMetaPB& in)
     if (in.has_binlog_config()) {
         out->mutable_binlog_config()->CopyFrom(in.binlog_config());
     }
-    if (in.has_row_binlog_schema()) {
-        doris_tablet_schema_to_cloud(out->mutable_row_binlog_schema(), 
in.row_binlog_schema());
-    }
-    if (in.row_binlog_rs_metas_size()) {
-        
out->mutable_row_binlog_rs_metas()->Reserve(in.row_binlog_rs_metas_size());
-        for (const auto& rs_meta : in.row_binlog_rs_metas()) {
-            doris_rowset_meta_to_cloud(out->add_row_binlog_rs_metas(), 
rs_meta);
-        }
-    }
-    if (in.has_row_binlog_schema_hash()) {
-        out->set_row_binlog_schema_hash(in.row_binlog_schema_hash());
-    }
+    out->set_is_row_binlog_tablet(in.is_row_binlog_tablet());

Review Comment:
   ok



##########
be/src/storage/tablet/tablet_schema.h:
##########
@@ -518,6 +518,7 @@ class TabletSchema : public MetadataAdder<TabletSchema> {
     int32_t version_col_idx() const { return _version_col_idx; }
     bool has_skip_bitmap_col() const { return _skip_bitmap_col_idx != -1; }
     int32_t skip_bitmap_col_idx() const { return _skip_bitmap_col_idx; }
+    bool enable_tso() const { return _commit_tso_col_idx != -1 || 
_binlog_tso_col_idx != -1; }

Review Comment:
   enable_tso -> is_tso_enabled



##########
be/src/storage/compaction/cumulative_compaction.cpp:
##########
@@ -177,13 +177,21 @@ Status CumulativeCompaction::pick_rowsets_to_compact() {
         }
     }
 
-    int64_t max_score = config::cumulative_compaction_max_deltas;
+    int64_t max_score = tablet()->is_row_binlog_tablet()
+                                ? config::binlog_level_compaction_max_deltas
+                                : config::cumulative_compaction_max_deltas;
     int64_t process_memory_usage = 
doris::GlobalMemoryArbitrator::process_memory_usage();
     bool memory_usage_high = process_memory_usage > MemInfo::soft_mem_limit() 
* 8 / 10;
     if (tablet()->last_compaction_status.is<ErrorCode::MEM_LIMIT_EXCEEDED>() 
|| memory_usage_high) {
-        max_score = std::max(config::cumulative_compaction_max_deltas /
-                                     
config::cumulative_compaction_max_deltas_factor,
-                             config::cumulative_compaction_min_deltas + 1);
+        if (tablet()->is_row_binlog_tablet()) {
+            max_score = 
std::max<int64_t>(config::binlog_level_compaction_max_deltas /
+                                                  
config::cumulative_compaction_max_deltas_factor,
+                                          1);

Review Comment:
   fix



##########
be/src/storage/tablet/base_tablet.cpp:
##########
@@ -1525,13 +1507,14 @@ Status BaseTablet::update_delete_bitmap(const 
BaseTabletSPtr& self, TabletTxnInf
     DeleteBitmapPtr delete_bitmap = txn_info->delete_bitmap;
     bool is_partial_update =
             txn_info->partial_update_info && 
txn_info->partial_update_info->is_partial_update();
-    for (const auto& rs : txn_info->attach_rowsets) {
-        if (rs != nullptr && rs->rowset_meta() != nullptr && 
rs->rowset_meta()->is_row_binlog()) {
-            row_binlog_rowset = rs;
-            build_row_binlog = is_partial_update ||
-                               
self->tablet_meta()->binlog_config().need_historical_value();
-            break;
-        }
+    const auto& binlog_rs = txn_info->attach_row_binlog.rowset;
+    if (binlog_rs != nullptr && binlog_rs->rowset_meta() != nullptr &&
+        binlog_rs->rowset_meta()->is_row_binlog()) {
+        DCHECK(txn_info->attach_row_binlog.tablet != nullptr);
+        row_binlog_rowset = binlog_rs;
+        build_row_binlog = is_partial_update || 
txn_info->attach_row_binlog.tablet->tablet_meta()
+                                                        ->binlog_config()
+                                                        
.need_historical_value();

Review Comment:
   fix type



##########
be/src/storage/rowset/rowset.cpp:
##########
@@ -108,10 +108,10 @@ bool Rowset::check_rowset_segment() {
 std::string Rowset::get_rowset_info_str() {
     std::string disk_size = PrettyPrinter::print(
             static_cast<uint64_t>(_rowset_meta->total_disk_size()), 
TUnit::BYTES);
-    return fmt::format("[{}-{}] {} {} {} {} {}", start_version(), 
end_version(), num_segments(),
-                       _rowset_meta->has_delete_predicate() ? "DELETE" : 
"DATA",
+    return fmt::format("[{}-{}] {} {} {} {} level={} {}", start_version(), 
end_version(),

Review Comment:
   fixed



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/CloudTabletStatMgr.java:
##########
@@ -353,14 +354,18 @@ private void updateStatInfo(List<Long> dbIds) {
                             dynamicPartitionNearLimitCount++;
                         }
                     }
+                    long tableBinlogSize = 0L;

Review Comment:
   Yes
   
   <img width="1380" height="1100" alt="Image" 
src="https://github.com/user-attachments/assets/8a15d01c-07d8-4e85-a5b3-a82ef1987b13";
 />



##########
be/src/load/stream_load/stream_load_context.cpp:
##########
@@ -377,4 +377,9 @@ bool StreamLoadContext::is_mow_table() const {
            put_result.pipeline_params.is_mow_table;
 }
 
+bool StreamLoadContext::enable_tso() const {

Review Comment:
   ok



##########
be/src/storage/compaction/compaction.cpp:
##########
@@ -2001,7 +2020,8 @@ void CloudCompactionMixin::update_compaction_level() {
     } else {
         auto compaction_policy = _tablet->tablet_meta()->compaction_policy();
         auto cumu_policy = _engine.cumu_compaction_policy(compaction_policy);
-        if (cumu_policy && cumu_policy->name() == 
CUMULATIVE_TIME_SERIES_POLICY) {
+        if (cumu_policy && (cumu_policy->name() == 
CUMULATIVE_TIME_SERIES_POLICY ||
+                            cumu_policy->name() == 
std::string(CUMULATIVE_BINLOG_POLICY))) {

Review Comment:
   fixed



##########
be/src/cloud/cloud_tablet_mgr.cpp:
##########
@@ -428,13 +434,21 @@ Status CloudTabletMgr::get_topn_tablets_to_compact(
         int n, CompactionType compaction_type, const 
std::function<bool(CloudTablet*)>& filter_out,
         std::vector<std::shared_ptr<CloudTablet>>* tablets, int64_t* 
max_score) {
     DCHECK(compaction_type == CompactionType::BASE_COMPACTION ||
-           compaction_type == CompactionType::CUMULATIVE_COMPACTION);
+           compaction_type == CompactionType::CUMULATIVE_COMPACTION ||
+           compaction_type == CompactionType::CUMU_BINLOG_COMPACTION);
     *max_score = 0;
     int64_t max_score_tablet_id = 0;
     // clang-format off
     auto score = [compaction_type](CloudTablet* t) {
+        if (compaction_type == CompactionType::CUMU_BINLOG_COMPACTION && 
!t->is_row_binlog_tablet()) {

Review Comment:
   binlog tablet need score but it only accept CUMU_BINLOG_COMPACTION



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