gavinchou commented on code in PR #37293:
URL: https://github.com/apache/doris/pull/37293#discussion_r1698258408


##########
be/src/cloud/cloud_meta_mgr.cpp:
##########
@@ -448,7 +448,8 @@ Status CloudMetaMgr::sync_tablet_rowsets(CloudTablet* 
tablet, bool warmup_delta_
         int64_t now = 
duration_cast<seconds>(system_clock::now().time_since_epoch()).count();
         tablet->last_sync_time_s = now;
 
-        if (tablet->enable_unique_key_merge_on_write()) {
+        if (tablet->enable_unique_key_merge_on_write() &&
+            tablet->tablet_state() == TABLET_RUNNING) {

Review Comment:
   what if new_tablet (MOW) triggered compaction happens
   is there any chance to lose delete bitmap info.



##########
be/src/cloud/config.cpp:
##########
@@ -59,4 +59,6 @@ DEFINE_mBool(save_load_error_log_to_s3, "false");
 
 DEFINE_mInt32(sync_load_for_tablets_thread, "32");
 
+DEFINE_mBool(enable_new_tablet_do_compaction, "true");

Review Comment:
   default false



##########
be/src/cloud/cloud_cumulative_compaction.cpp:
##########
@@ -48,7 +48,8 @@ 
CloudCumulativeCompaction::CloudCumulativeCompaction(CloudStorageEngine& engine,
 CloudCumulativeCompaction::~CloudCumulativeCompaction() = default;
 
 Status CloudCumulativeCompaction::prepare_compact() {
-    if (_tablet->tablet_state() != TABLET_RUNNING) {
+    if (_tablet->tablet_state() != TABLET_RUNNING && 
config::enable_new_tablet_do_compaction &&
+        dynamic_cast<CloudTablet*>(_tablet.get())->alter_version() == -1) {
         return Status::InternalError("invalid tablet state. tablet_id={}", 
_tablet->tablet_id());

Review Comment:
   static_cast



##########
be/src/olap/base_tablet.cpp:
##########
@@ -1437,7 +1437,7 @@ Status BaseTablet::update_delete_bitmap_without_lock(
                       << ", rnd:" << rnd << ", percent: " << percent;
         }
     });
-    int64_t cur_version = rowset->end_version();
+    int64_t cur_version = rowset->start_version();

Review Comment:
   why do we change this?



##########
gensrc/proto/cloud.proto:
##########
@@ -1324,6 +1327,7 @@ enum MetaServiceCode {
     JOB_ALREADY_SUCCESS = 5002;
     ROUTINE_LOAD_DATA_INCONSISTENT = 5003;
     ROUTINE_LOAD_PROGRESS_NOT_FOUND = 5004;
+    JOB_CHECK_ALTER_VERSION_FAIL = 5005;

Review Comment:
   just call it JOB_CHECK_ALTER_VERSION



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