Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](ccr) Enable feature but no sync table property #46219

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
import org.apache.doris.mysql.privilege.PrivPredicate;
import org.apache.doris.nereids.trees.plans.commands.info.ColumnDefinition;
import org.apache.doris.persist.AlterLightSchemaChangeInfo;
import org.apache.doris.persist.ModifyTablePropertyOperationLog;
import org.apache.doris.persist.RemoveAlterJobV2OperationLog;
import org.apache.doris.persist.TableAddOrDropColumnsInfo;
import org.apache.doris.persist.TableAddOrDropInvertedIndicesInfo;
Expand Down Expand Up @@ -2912,7 +2913,7 @@ public void modifyTableLightSchemaChange(String rawSql, Database db, OlapTable o

//update base index schema
try {
updateBaseIndexSchema(olapTable, indexSchemaMap, indexes);
updateBaseIndexSchema(db, olapTable, indexSchemaMap, indexes);
} catch (Exception e) {
throw new DdlException(e.getMessage());
}
Expand Down Expand Up @@ -3095,7 +3096,7 @@ public Map<Long, List<Column>> checkTable(Database db, OlapTable olapTable,
return changedIndexIdToSchema;
}

public void updateBaseIndexSchema(OlapTable olapTable, Map<Long, LinkedList<Column>> indexSchemaMap,
public void updateBaseIndexSchema(Database db, OlapTable olapTable, Map<Long, LinkedList<Column>> indexSchemaMap,
List<Index> indexes) throws IOException {
long baseIndexId = olapTable.getBaseIndexId();
List<Long> indexIds = new ArrayList<Long>();
Expand Down Expand Up @@ -3130,6 +3131,10 @@ public void updateBaseIndexSchema(OlapTable olapTable, Map<Long, LinkedList<Colu
}
if (hasEnableUniqueKeySkipBitmapChanged) {
olapTable.setEnableUniqueKeySkipBitmap(true);
ModifyTablePropertyOperationLog info = new ModifyTablePropertyOperationLog(db.getId(), olapTable.getId(),
olapTable.getName(),
olapTable.getTableProperty().getProperties());
Env.getCurrentEnv().getEditLog().logModifyTableProperties(info);
}
olapTable.setIndexes(indexes);
olapTable.rebuildFullSchema();
Expand Down
Loading