Data Inconsistency When Players Switch Servers with MySQL Sync #514
Description
Description
I encountered an issue when using MySQL to sync player data: there is a chance that data fails to synchronize properly when players switch between servers quickly, resulting in data loss. This is particularly noticeable in scenarios with frequent server switching and negatively impacts the player experience.
Steps to Reproduce
- Configure MySQL as the database for player data synchronization.
- Have a player switch between two servers rapidly.
- Observe the data in the database and on the new server; occasionally, the data may be missing or out of sync.
Expected Behavior
I would like a mechanism (e.g., a locking mechanism) to ensure data consistency during server switches, so that no data is lost in the process.
Proposed Solution
Consider implementing a locking mechanism during the synchronization process to prevent related operations or reads until the player's data is fully synchronized. This would help ensure that data remains consistent when players switch servers.
Environment Details
- Plugin version: 1.15.2 for 1.19.2-1.21.1
- Server software and version: Paper-1.21.1
Please let me know if more information or debugging assistance is needed!