sd4324530 commented on issue #2270: URL: https://github.com/apache/fluss/issues/2270#issuecomment-3702316447
> Since `sys.set_cluster_config` hasn’t been released yet, we still have the opportunity to refine its design.由于 `sys.set_cluster_config` 尚未发布,我们仍有机会完善其设计。 > > I propose introducing a **dedicated `sys.reset_cluster_configs`** procedure specifically for resetting cluster configuration(s)—mirroring the pattern used in SQL with `ALTER TABLE ... RESET`, which clearly signals intent and avoids overloading `SET` with reset semantics.我建议引入一个专门用于重置集群配置的**专用 `sys.reset_cluster_configs`** 过程——与 SQL 中使用 `ALTER TABLE ... RESET` 模式类似,这样可以清晰地表明意图,避免 `SET` 被重置语义所淹没。 > > Additionally, to better reflect that these procedures support **multiple keys**, we should rename all related procedures from the singular `xx_cluster_config` to the plural form **`xx_cluster_configs`** (e.g., `set_cluster_configs`, `reset_cluster_configs`). This aligns with common conventions and improves API clarity.此外,为了更好地体现这些过程支持**多个键 **,我们应该将所有相关过程的名称从单数形式 `xx_cluster_config` 更改为复数形式 **`xx_cluster_configs`** (例如, `set_cluster_configs` 、 `reset_cluster_configs` )。这符合通用约定,并提高了 API 的清晰度。 > > This change would make the system more consistent, intuitive, and forward-compatible.这项改变将使系统更加一致、直观且向前兼容。 > > -- Get all cluster configurations > CALL sys.get_cluster_configs(); > > -- Get a specific configuration > CALL sys.get_cluster_configs( > 'kv.rocksdb.shared-rate-limiter.bytes-per-sec' > ); > > -- Get multiple configurations > CALL sys.get_cluster_configs( > 'kv.rocksdb.shared-rate-limiter.bytes-per-sec', > 'datalake.format' > ); > > -- Set RocksDB rate limiter to 200MB > CALL sys.set_cluster_config( > 'kv.rocksdb.shared-rate-limiter.bytes-per-sec', > '200MB' > ); > > -- Set multiple configurations at one time > CALL sys.set_cluster_configs( > 'kv.rocksdb.shared-rate-limiter.bytes-per-sec', '200MB', > 'kv.snapshot.interval', '3min' > ); > > -- Reset a configuration (reset to default) > CALL sys.reset_clulster_configs( > 'kv.rocksdb.shared-rate-limiter.bytes-per-sec' > ); > > -- Reset multiple configurations at one time > CALL sys.reset_clulster_configs( > 'kv.rocksdb.shared-rate-limiter.bytes-per-sec', > 'kv.snapshot.interval' > ); > What do you think? 你怎么认为?[@sd4324530](https://github.com/sd4324530) [@platinumhamburg](https://github.com/platinumhamburg) [@loserwang1024](https://github.com/loserwang1024) @wuchong I think it's really better design, more powerful, and without ambiguity -- 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]
