This is an automated email from the ASF dual-hosted git repository.
liaoxin 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 d4cde6f773e [fix](merge-cloud) fix load return invalid tablet state
when MoW table under alter (#32500)
d4cde6f773e is described below
commit d4cde6f773e4c9051327ce5809c9d745b551adf2
Author: Xin Liao <[email protected]>
AuthorDate: Wed Mar 20 17:50:34 2024 +0800
[fix](merge-cloud) fix load return invalid tablet state when MoW table
under alter (#32500)
---
be/src/cloud/cloud_rowset_builder.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/be/src/cloud/cloud_rowset_builder.cpp
b/be/src/cloud/cloud_rowset_builder.cpp
index 8375c2c3de3..72010fa6e9c 100644
--- a/be/src/cloud/cloud_rowset_builder.cpp
+++ b/be/src/cloud/cloud_rowset_builder.cpp
@@ -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::static_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());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]