hqx871 commented on code in PR #64167:
URL: https://github.com/apache/doris/pull/64167#discussion_r3542887184
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/InternalCatalog.java:
##########
@@ -3261,6 +3374,35 @@ private boolean createOlapTable(Database db,
CreateTableInfo createTableInfo) th
ColocatePersistInfo info =
ColocatePersistInfo.createForAddTable(groupId, tableId,
backendsPerBucketSeq);
Env.getCurrentEnv().getEditLog().logColocateAddTable(info);
+ } else {
+ if
(Env.getCurrentTenantLevelColocateIndex().isColocateMasterTable(tableId)) {
+ Map<Tag, GroupV2Id> groups =
Env.getCurrentTenantLevelColocateIndex()
+ .getMasterGroupByTable(tableId);
+ Map<GroupV2Id, List<List<Long>>> map = new
HashMap<>();
+ for (Map.Entry<Tag, GroupV2Id> entry :
groups.entrySet()) {
+ GroupV2Id groupId = entry.getValue();
+ List<List<Long>> backendsPerBucketSeq =
Env.getCurrentTenantLevelColocateIndex()
+
.getBackendsPerBucketSeqByGroup(groupId);
+ map.put(groupId, backendsPerBucketSeq);
+ }
+ TenantLevelColocateTableInfo info = new
TenantLevelColocateTableInfo(db.getId(), tableId,
+ map);
+
Env.getCurrentEnv().getEditLog().logColocateAddTableV2(info);
+ }
Review Comment:
Maybe, but it is same as old colcoate_with
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]