wuchong commented on code in PR #2781:
URL: https://github.com/apache/fluss/pull/2781#discussion_r3035276900


##########
fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java:
##########
@@ -337,7 +338,9 @@ public void completeDeleteTable(long tableId) {
         // delete bucket assignments node, which will also delete the bucket 
state node,
         // so that all the zk nodes related to this table are deleted.
         rethrowIfIsNotNoNodeException(
-                () -> zookeeperClient.deleteTableAssignment(tableId),
+                () ->
+                        zookeeperClient.deleteTableAssignment(
+                                tableId, 
ZkVersion.MATCH_ANY_VERSION.getVersion()),

Review Comment:
   This async cleanup can run after delete work has already been queued.
   Passing MATCH_ANY_VERSION disables coordinator epoch fencing, so a stale 
coordinator can still delete the table-assignment znode after leadership 
changes. We should pass in the coordinator zk version for a safe deletion. The 
coordiantor zk version can be got from CoordinatorContext when calling 
MetadataManager. 



-- 
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]

Reply via email to