CRITICAL FIX - Stale server overwrite prevention: - writeSnapshotToDB now guards ALL writes with AND last_server=? so a crashing/slow server cannot overwrite fresher data saved by another server - Logout and shutdown saves atomically set online=0 in the SAME UPDATE as the data write (no more gap between data write and flag set) - ModCompatSync.writeModSnapshot guarded variant uses subquery on last_server CRITICAL FIX - Poll loop actually waits now: - onPlayerLoggedInKickCheck no longer sets last_server (only online=1) - last_server is claimed AFTER the poll in doPlayerJoin completes - This allows the poll to correctly detect and wait for the old server's async save to finish before reading data - Poll increased from 30 to 60 attempts (30s window) Memory leak fix: - Added removePlayerLock() in doPlayerJoin's outer catch block to prevent unbounded growth of playerLocks ConcurrentHashMap on exceptions Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| java/vip/fubuki/playersync | ||
| resources | ||
| templates | ||