xiangfu0 commented on code in PR #11782:
URL: https://github.com/apache/pinot/pull/11782#discussion_r1359850183
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1819,35 +1823,41 @@ public void setExistingTableConfig(TableConfig
tableConfig)
public void updateMetadataConfigFor(String tableName, TableType type,
TableCustomConfig newConfigs)
throws Exception {
String tableNameWithType =
TableNameBuilder.forType(type).tableNameWithType(tableName);
- TableConfig tableConfig =
ZKMetadataProvider.getTableConfig(_propertyStore, tableNameWithType);
- if (tableConfig == null) {
+ ImmutablePair<TableConfig, Integer> tableConfigWithVersion =
+ ZKMetadataProvider.getTableConfigWithVersion(_propertyStore,
tableNameWithType);
+ if (tableConfigWithVersion == null) {
throw new RuntimeException("Table: " + tableName + " of type: " + type +
" does not exist");
}
+ TableConfig tableConfig = tableConfigWithVersion.getLeft();
tableConfig.setCustomConfig(newConfigs);
- setExistingTableConfig(tableConfig);
+ setExistingTableConfig(tableConfig, tableConfigWithVersion.getRight());
Review Comment:
method `setExistingTableConfig(...)` returns void, the exception will be
thrown from it.
--
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]