[BugFix]Disable tablet creation optimization when partitions has multiple indexes (backport #62595) (#62600)
Signed-off-by: sevev <qiangzh95@gmail.com> Co-authored-by: zhangqiang <qiangzh95@gmail.com>
This commit is contained in:
parent
ff3e3b86bd
commit
678a880fe3
|
|
@ -215,6 +215,11 @@ public class TabletTaskExecutor {
|
|||
CreateTabletOption option)
|
||||
throws DdlException {
|
||||
ArrayList<CreateReplicaTask> tasks = new ArrayList<>((int) physicalPartition.storageReplicaCount());
|
||||
// TabletCreationOptimization must ensure that the schemas of all tablets under a partition are consistent.
|
||||
// If multiple indexes exist in the partition, disable TabletCreationOptimization.
|
||||
if (physicalPartition.getMaterializedIndices(MaterializedIndex.IndexExtState.VISIBLE).size() > 1) {
|
||||
option.setEnableTabletCreationOptimization(false);
|
||||
}
|
||||
for (MaterializedIndex index : physicalPartition.getMaterializedIndices(MaterializedIndex.IndexExtState.VISIBLE)) {
|
||||
tasks.addAll(buildCreateReplicaTasks(dbId, table, physicalPartition, index, computeResource, option));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue