xiangfu0 commented on code in PR #11782:
URL: https://github.com/apache/pinot/pull/11782#discussion_r1359850266
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java:
##########
@@ -1795,8 +1790,17 @@ public void updateTableConfig(TableConfig tableConfig)
*/
public void setExistingTableConfig(TableConfig tableConfig)
throws IOException {
+ setExistingTableConfig(tableConfig, -1);
+ }
+
+ /**
+ * Sets the given table config into zookeeper with the expected version,
which is the previous tableConfig znRecord
+ * version. If the expected version is -1, the version check is ignored.
+ */
+ public void setExistingTableConfig(TableConfig tableConfig, int
expectedVersion)
+ throws IOException {
String tableNameWithType = tableConfig.getTableName();
- ZKMetadataProvider.setTableConfig(_propertyStore, tableNameWithType,
TableConfigUtils.toZNRecord(tableConfig));
+ ZKMetadataProvider.setTableConfig(_propertyStore, tableConfig,
expectedVersion);
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]