xiangfu0 commented on code in PR #11782: URL: https://github.com/apache/pinot/pull/11782#discussion_r1355893388
########## pinot-common/src/main/java/org/apache/pinot/common/metadata/ZKMetadataProvider.java: ########## @@ -73,12 +74,33 @@ public static void setUserConfig(ZkHelixPropertyStore<ZNRecord> propertyStore, S propertyStore.set(constructPropertyStorePathForUserConfig(username), znRecord, AccessOption.PERSISTENT); } + @Deprecated public static void setTableConfig(ZkHelixPropertyStore<ZNRecord> propertyStore, String tableNameWithType, ZNRecord znRecord) { propertyStore.set(constructPropertyStorePathForResourceConfig(tableNameWithType), znRecord, AccessOption.PERSISTENT); } + /** + * Update table config with an expected version. This is to avoid race condition for table config update issued by + * multiple clients, especially when update configs in a programmatic way. + * The typical usage is to read table config, apply some changes, then update it. + * + * @return true if update is successful. + */ + public static boolean setTableConfig(ZkHelixPropertyStore<ZNRecord> propertyStore, String tableNameWithType, 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org