Skip to content

Migrate the data handler system to SwoftyDataHandler - #832

Merged
Swofty-Developments merged 32 commits into
masterfrom
feat/swoftydatahandler-migration
Aug 12, 2026
Merged

Migrate the data handler system to SwoftyDataHandler#832
Swofty-Developments merged 32 commits into
masterfrom
feat/swoftydatahandler-migration

Conversation

@Swofty-Developments

Copy link
Copy Markdown
Owner

No description provided.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hypixel-skyblock Ignored Ignored Jul 24, 2026 3:53am

@Swofty-Developments
Swofty-Developments force-pushed the feat/swoftydatahandler-migration branch from a7c0ce6 to 33877a7 Compare July 23, 2026 22:41
@Swofty-Developments
Swofty-Developments changed the base branch from fix/auction-house-and-proxy-heartbeat to master July 23, 2026 22:41
…epare

Every server-to-server transfer path now sends a single awaited PrepareTransfer that both warms the target server's active player-data domains and records the origin server before the connection is established, so the destination always has data and origin ready when the player arrives. This replaces the fire-and-forget GivePlayersOriginType message that raced the connection, which is deleted along with its proxy protocol registration and now-unused imports. The origin holder is reduced to a plain map populated by the prepare handler, and PlayerSwitched is emitted to the origin on the live transfer path so post-transfer callbacks fire consistently across the limbo and direct paths.
Master's transfer document handoff supersedes the branch's prepare protocol: the origin now flushes every player-data domain through the DataAPI and ships the resulting account and profile documents, and the destination seeds its handlers from PlayerTransferDataCache before falling back to a storage load. The origin marks the player handed off so its disconnect save no longer races the destination's first writes.

The deleted player-data flows are folded into the domain layer: the resource pack is applied during the configuration phase, the resource pack quit hook moves to a domain cleanup step, and the SkyBlock profile intro adopts master's text system. Master's ravengard profile system keeps its own Mongo storage, with the session flush re-homed into RavengardDomain.

The store purchase fulfilment listener reads and writes ranks through the account DataAPI and keeps its entitlements in a dedicated Mongo collection, and the removed data mutex service is dropped from the release, docker and installer manifests.
Datapoint.setValue no longer silently drops same-reference sets from the get-mutate-set idiom; it compares the serialized form against the last written one so collections and bank interest write through while the repeat-set-value loop still avoids hammering redis. Failed datapoint saves are logged with the player uuid and datapoint key instead of being swallowed, and the remaining datapoints are still saved. Adds a shutdown task that saves and unloads every online player and flushes the data api, plus a five minute autosave spread across online players that respects handoff suppression. Offline account and profile reads release their container unless the player is loaded on this node, and per-uuid striped locks serialize disconnect saves against rejoin loads so a fast reconnect can no longer be evicted by the previous session.
Routes coop-shared writes through transactionDirect so the read-modify-write sees storage rather than this node's cache, debits the purse exactly once and only after the bank credit commits, persists the solo banker paths through setValue, links freshly minted coop profiles before any coop-backed write, and guards the roster read-modify-write with a distributed lock. Drops the dead bank-hash mechanism and the per-block-break proxy fan-out, unlinks and unloads the shared coop document when the last member leaves, and reworks the mutex smoke test to run against the caller's real coop container.
Subscribes channels registered after startListeners so late requests stop timing out, surfaces publish failures instead of dropping the futures, and shuts redis and the data api down on proxy and service exit. Proxy reads now unload their data containers so island routing and rank projection see fresh documents, transfers run on virtual threads, the island fan-out is parallel with a bounded wait, origin server entries are consumed atomically, and the superseded ServiceToServerManager is removed.
Picks up the fixed distributed event path with typed linked keys, working transactionDirect, transactional change events, link rehydration and expiration events that the migrated coop and banker code relies on.
…g coop state

Failed transfers left a handoff stamp armed, so the disconnect save and the next autosave were skipped for sixty seconds and the session's inventory and experience snapshots were lost. The stamp is now cleared through a proxy-side failure hook on every failure path, and the proxy's unresolvable-server branch reports failure instead of a silent success. loadSkyBlock now deep-clones the shared enum default datapoint on both fallback branches so one player's write-through can no longer land in another player's profile, and seeding from a transfer document reads coop-backed datapoints from the linked container rather than replaying the shipped snapshot over a partner's concurrent updates. Offline profile reads on game servers release their container unless the profile is hosted on this node, and coop link containers are released once no loaded player references them.
…leaks

Datapoint write-through now goes through a per-player serialized queue on virtual threads, so a full-document redis write no longer blocks the tick thread while writes for one player stay ordered. Saves, transfer flushes, disconnects and shutdown drain that queue before persisting, and the entry is dropped on unload. Game domains are registered with the player data service and get write-through, so their stats survive an unclean exit. saveAndUnloadAll saves every domain before unloading any, failed transfers clear their handoff stamp through the new hook, the account name index is written after the ign is known, and the service type entry for the deleted data mutex module is gone from the enum and every loader's required list.
…ce coop leave

Bank interest now applies on a virtual thread so the spawn path never waits on the cross-node coop lock, with the solo branch synchronized against concurrent spawns double-awarding. Coop leave polls until the asynchronous disconnect save has unloaded the profile before unlinking and cleaning up, and the mutex smoke test counter is subscribed so cross-node lost updates are actually observable.
Transactions now reread the entity from storage under the distributed lock, closing the window where a node could clobber another node's write after winning the lock race against the pubsub update.
@Swofty-Developments
Swofty-Developments marked this pull request as ready for review August 12, 2026 08:21
The lobby command now returns skyblock players to the prototype lobby instead of the hub, which stays reachable only through the hub command and the explicit lobby aliases, and the ravengard dungeon returns to the ravengard lobby. When a backend dies, session servers such as bedwars, skywars and murder mystery games now fall back to their own game's lobby rather than the prototype lobby, while persistent types still prefer another instance of the same type before falling back.
@Swofty-Developments
Swofty-Developments merged commit 800e547 into master Aug 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant