[Fix](MoW) Fix dup key when do schema change add new key (#22154)

This commit is contained in:
abmdocrt
2023-07-25 14:18:01 +08:00
committed by GitHub
parent 103c473b96
commit c251a574e8

View File

@ -1274,6 +1274,12 @@ Status SchemaChangeHandler::_parse_request(const SchemaChangeParams& sc_params,
return Status::OK();
}
if (new_tablet->enable_unique_key_merge_on_write() &&
new_tablet->num_key_columns() > base_tablet_schema->num_key_columns()) {
*sc_directly = true;
return Status::OK();
}
if (base_tablet_schema->num_short_key_columns() != new_tablet->num_short_key_columns()) {
// the number of short_keys changed, can't do linked schema change
*sc_directly = true;