[Bug] [Master] JDBC registry may miss REMOVE events for expired ephemeral nodes
Search before asking
- [x] I had searched in the issues and found no similar issues.
What happened
When using the JDBC registry , stale EPHEMERAL registry data may be removed from the database without correctly notifying running services.
This can cause running Master instances to keep stale in-memory registry state.
What you expected to happen
How to reproduce
Use JDBC registry.
1.Start a Master or Alert Server instance with address A. 2.Start a replacement instance with address B before address A is considered expired. 3.Stop or kill the old instance A. 4.Wait for JDBC registry cleanup. For Master:
Check DB and confirm only one Master registry data row exists: select * from t_ds_jdbc_registry_data where data_key like '%/nodes/master/%'; Debug or log MasterSlotManager and observe: currentSlotIndex = 0 totalSlot = 2 Check t_ds_command and observe commands that never get fetched because they belong to the missing slot.
Anything else
No response
Version
3.4.1
Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
cc @ruanwenjun
Good catch, we shouldn't assemble the data to the event.