Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
Description
In a multi-server cluster, updating dynamic configs may produce the following error after the configs have been applied successfully:
ERROR ZkNodeChangeNotificationWatcher - Error while purging obsolete notification change for path = /config/changes/config_change_0000000007
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:143)
at org.apache.fluss.server.authorizer.ZkNodeChangeNotificationWatcher.purgeObsoleteNotifications(ZkNodeChangeNotificationWatcher.java:142)
Root cause
Each watcher reads a snapshot of all children under /config/changes and independently purges expired nodes. After one watcher deletes a node, another watcher may still have it in its children snapshot.
getStat() then returns Optional.empty(), but the result is accessed directly with Optional.get():
Stat state = zooKeeperClient.getStat(notificationNode).get();
Solution
Do empty check before get the state.
Are you willing to submit a PR?
Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
Description
In a multi-server cluster, updating dynamic configs may produce the following error after the configs have been applied successfully:
Root cause
Each watcher reads a snapshot of all children under /config/changes and independently purges expired nodes. After one watcher deletes a node, another watcher may still have it in its children snapshot.
getStat() then returns Optional.empty(), but the result is accessed directly with Optional.get():
Solution
Do empty check before get the state.
Are you willing to submit a PR?