liaoxin01 commented on code in PR #70301:
URL: https://github.com/apache/doris/pull/70301#discussion_r4489898138
##########
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.
+ for (MaterializedIndexMeta indexMeta : new
TreeMap<>(getIndexIdToMeta()).values()) {
Review Comment:
done.
--
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]