Skip to content

Commit

Permalink
[fix](merge-cloud) fix load return invalid tablet state when MoW tabl…
Browse files Browse the repository at this point in the history
…e under alter
  • Loading branch information
liaoxin01 committed Mar 19, 2024
1 parent deb95f4 commit f700a38
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion be/src/cloud/cloud_rowset_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ Status CloudRowsetBuilder::init() {

std::shared_ptr<MowContext> mow_context;
if (_tablet->enable_unique_key_merge_on_write()) {
RETURN_IF_ERROR(std::dynamic_pointer_cast<CloudTablet>(_tablet)->sync_rowsets());
auto st = std::dynamic_pointer_cast<CloudTablet>(_tablet)->sync_rowsets();
// sync_rowsets will return INVALID_TABLET_STATE when tablet is under alter
if (!st.ok() && !st.is<ErrorCode::INVALID_TABLET_STATE>()) {
return st;
}
RETURN_IF_ERROR(init_mow_context(mow_context));
}
RETURN_IF_ERROR(check_tablet_version_count());
Expand Down

0 comments on commit f700a38

Please sign in to comment.