You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[server] Table and partition metadata may become inconsistent after drop and recreation #4741
After some investigations, a possible reason could be:
Currently, Fluss may identify deleted tables and partitions by their table paths or partition names when processing UpdateMetadata requests.
This can lead to incorrect metadata cleanup when a table or partition is dropped and recreated with the same name before the previous deletion notification is processed.
For example:
A table db.t (table ID 100) with partition p1 (partition ID 200) is created.
The table or partition is dropped, but its metadata deletion notification is delayed.
A new table db.t (table ID 101) with partition p1 (partition ID 201) is created.
The delayed deletion notification for the old table or partition arrives.
Since the old and new objects share the same path or name, the deletion may incorrectly remove metadata belonging to the newly created object.
Additionally, stale partition metadata may remain in the TabletServer metadata cache after its parent table is deleted or recreated, potentially exposing old partition metadata through the new table path.
Expected behavior: Metadata deletion should only affect the original table or partition. Recreated objects with different IDs must remain unaffected, and stale partition metadata must not be exposed through a newly created table.
Solution
Preserve the original table ID and partition ID in metadata deletion notifications, and perform cleanup based on these IDs rather than paths or names.
Keep table and partition metadata mappings consistent when objects are deleted or recreated.
Prevent newly created tables from inheriting stale partition metadata associated with a previous table ID.
Ensure deletion notifications are not applied as regular replica metadata updates.
Maintain compatibility with legacy deletion notifications during rolling upgrades.
Add regression tests covering table/partition recreation and delayed deletion notifications.
Activity