This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c41562a37b9 [Bug](cooldown) Fix problem that followers may never
completely cooldown (#28561)
c41562a37b9 is described below
commit c41562a37b92d99853d2eb520dfc44a96034d614
Author: plat1ko <[email protected]>
AuthorDate: Tue Dec 19 16:03:59 2023 +0800
[Bug](cooldown) Fix problem that followers may never completely cooldown
(#28561)
---
be/src/olap/tablet.cpp | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp
index 195f5072578..47fd726b375 100644
--- a/be/src/olap/tablet.cpp
+++ b/be/src/olap/tablet.cpp
@@ -2122,16 +2122,7 @@ Status Tablet::_cooldown_data() {
LOG(INFO) << "cannot pick cooldown rowset in tablet " << tablet_id();
return Status::OK();
}
- if (old_rowset->num_segments() < 1) {
- // Empty rowset, just reset rowset's resource_id
- std::lock_guard meta_wlock(_meta_lock);
- SCOPED_SIMPLE_TRACE_IF_TIMEOUT(TRACE_TABLET_LOCK_THRESHOLD);
- old_rowset->rowset_meta()->set_fs(dest_fs);
- LOG(INFO) << "cooldown empty rowset " << old_rowset->version() << " "
- << old_rowset->rowset_id().to_string() << " to " <<
dest_fs->root_path().native()
- << ", tablet_id=" << tablet_id();
- return Status::OK();
- }
+
RowsetId new_rowset_id = StorageEngine::instance()->next_rowset_id();
auto pending_rs_guard =
StorageEngine::instance()->pending_remote_rowsets().add(new_rowset_id);
Status st;
@@ -2178,7 +2169,9 @@ Status Tablet::_cooldown_data() {
SCOPED_SIMPLE_TRACE_IF_TIMEOUT(TRACE_TABLET_LOCK_THRESHOLD);
save_meta();
}
- // upload cooldowned rowset meta to remote fs
+ // Upload cooldowned rowset meta to remote fs
+ // ATTN: Even if it is an empty rowset, in order for the followers to
synchronize, the coolown meta must be
+ // uploaded, otherwise followers may never completely cooldown.
if (auto t =
StorageEngine::instance()->tablet_manager()->get_tablet(tablet_id());
t != nullptr) { // `t` can be nullptr if it has been dropped
async_write_cooldown_meta(std::move(t));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]