diff --git a/be/src/io/fs/s3_file_writer.cpp b/be/src/io/fs/s3_file_writer.cpp index b7a8eb043115dc..388aed1ea34eec 100644 --- a/be/src/io/fs/s3_file_writer.cpp +++ b/be/src/io/fs/s3_file_writer.cpp @@ -508,11 +508,12 @@ void S3FileWriter::_put_object(UploadFileBuffer& buf) { } std::string S3FileWriter::_dump_completed_part() const { - std::string view; + std::stringstream ss; + ss << "part_numbers:"; for (const auto& part : _completed_parts) { - view.append(fmt::format("part {}, ", view, part->GetPartNumber())); + ss << " " << part->GetPartNumber(); } - return view; + return ss.str(); } } // namespace doris::io diff --git a/be/src/olap/olap_server.cpp b/be/src/olap/olap_server.cpp index c288d3b42e118d..d0cd43172a0917 100644 --- a/be/src/olap/olap_server.cpp +++ b/be/src/olap/olap_server.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include @@ -1403,22 +1404,25 @@ void StorageEngine::_cold_data_compaction_producer_callback() { for (auto& [tablet, score] : tablet_to_follow) { LOG(INFO) << "submit to follow cooldown meta. tablet_id=" << tablet->tablet_id() << " score=" << score; - static_cast( - _cold_data_compaction_thread_pool->submit_func([&, t = std::move(tablet)]() { - { - std::lock_guard lock(tablet_submitted_mtx); - tablet_submitted.insert(t->tablet_id()); - } - auto st = t->cooldown(); - { - std::lock_guard lock(tablet_submitted_mtx); - tablet_submitted.erase(t->tablet_id()); - } - if (!st.ok()) { - LOG(WARNING) << "failed to cooldown. tablet_id=" << t->tablet_id() - << " err=" << st; - } - })); + static_cast(_cold_data_compaction_thread_pool->submit_func([&, + t = std::move( + tablet)]() { + { + std::lock_guard lock(tablet_submitted_mtx); + tablet_submitted.insert(t->tablet_id()); + } + auto st = t->cooldown(); + { + std::lock_guard lock(tablet_submitted_mtx); + tablet_submitted.erase(t->tablet_id()); + } + if (!st.ok()) { + // The cooldown of the replica may be relatively slow + // resulting in a short period of time where following cannot be successful + LOG_EVERY_N(WARNING, 5) + << "failed to cooldown. tablet_id=" << t->tablet_id() << " err=" << st; + } + })); } } }