liaoxin01 commented on code in PR #70301:
URL: https://github.com/apache/doris/pull/70301#discussion_r4489885914
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -577,16 +577,17 @@ public void setIndexMeta(long indexId, String indexName,
List<Column> schema, in
indexNameToId.put(indexName, indexId);
}
- // rebuild the full schema of table
- // the order of columns in fullSchema is meaningless
+ // Keep base columns first, then append index columns in a deterministic
order.
public void rebuildFullSchema() {
fullSchema.clear();
nameToColumn.clear();
for (Column baseColumn : indexIdToMeta.get(baseIndexId).getSchema()) {
fullSchema.add(baseColumn);
nameToColumn.put(baseColumn.getName(), baseColumn);
}
- for (MaterializedIndexMeta indexMeta : getIndexIdToMeta().values()) {
+ // Fresh and Gson-restored metadata can have different map iteration
orders.
+ // Group commit producers and consumers planned on different FEs need
the same layout.
Review Comment:
Cross-FE layout mismatches already occur with fresh versus Gson-restored
metadata. This PR makes the layout deterministic across upgraded FEs and covers
RESTORE ID remapping.
We acknowledge that rolling upgrades can still produce incompatible layouts,
including between FEs whose old layouts matched. Given the additional
implementation and maintenance cost, we are deferring mixed-version
compatibility to separate work and keeping this PR focused on same-version
consistency. The PR description documents this rollout limitation.
--
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]