swuferhong opened a new issue, #3481:
URL: https://github.com/apache/fluss/issues/3481

   ### Search before asking
   
   - [x] I searched in the [issues](https://github.com/apache/fluss/issues) and 
found nothing similar.
   
   
   ### Fluss version
   
   0.9.0 (latest release)
   
   ### Please describe the bug 🐞
   
   ## Description
   
   After a partitioned table is dropped, the coordinator's `tableCount`
   gauge often does not decrement to the correct value. The dropped table
   lingers in `CoordinatorContext.tablesToBeDeleted` (and therefore in
   `tablePathById`) until some unrelated replica-deletion response happens
   to invoke `TableManager.resumeDeletions()`. If no other table is being
   dropped, the entry can stay there indefinitely.
   
   ## Reproduction
   
   1. Create 5 tables, 2 of which are partitioned.
   2. Drop both partitioned tables. → `tableCount` reads `4` instead of `3`.
   3. Drop one of the remaining non-partitioned tables. → `tableCount`
      suddenly drops to `2` (because that drop's stop-replica response
      "piggy-backs" `resumeDeletions()` and finally evicts the partitioned
      tables together).
   
   A pure case can be reproduced by dropping a partitioned table that has
   **zero partitions**: the entry never leaves `tablesToBeDeleted`.
   
   ## Root cause
   
   `CoordinatorEventProcessor.processDropTable` calls
   `TableManager.onDeleteTable()`, which is a no-op for partitioned tables
   (their buckets live under `partitionAssignments`, not
   `tableAssignments`). Because partitioned tables also have no
   table-level replicas, `getAllReplicasForTable(tableId)` returns empty
   and `areAllReplicasInState(.., ReplicaDeletionSuccessful)` is
   **vacuously true** — i.e. the table is *ready* to be cleaned up the
   moment it enters `tablesToBeDeleted`. The bug is purely that nothing
   triggers `resumeDeletions()` for the partitioned-table path.
   
   ### Solution
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


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