zhannngchen commented on code in PR #48399: URL: https://github.com/apache/doris/pull/48399#discussion_r1984956441
########## cloud/src/meta-service/meta_service_job.cpp: ########## @@ -192,11 +194,27 @@ void start_compaction_job(MetaServiceCode& code, std::string& msg, std::stringst }), compactions.end()); // clang-format on // Check conflict job + if (std::ranges::any_of(compactions, [](const auto& c) { + return c.type() == TabletCompactionJobPB::STOP_TOKEN; + })) { + auto it = std::ranges::find_if(compactions, [](const auto& c) { + return c.type() == TabletCompactionJobPB::STOP_TOKEN; + }); + msg = fmt::format( + "compactions are not allowed on tablet_id={} currently, blocked by schema " + "change job delete_bitmap_initiator={}", + tablet_id, it->delete_bitmap_lock_initiator()); + code = MetaServiceCode::JOB_TABLET_BUSY; + return; + } if (compaction.type() == TabletCompactionJobPB::FULL) { // Full compaction is generally used for data correctness repair // for MOW table, so priority should be given to performing full // compaction operations and canceling other types of compaction. compactions.Clear(); + } else if (compaction.type() == TabletCompactionJobPB::STOP_TOKEN) { + // fail all existing compactions + compactions.Clear(); Review Comment: only affect the new tablet created by sc, and the time window is quite small, let's keep it simple -- 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