Skip to content

fix: wait for data cleanup before attempting load#678

Open
klga wants to merge 2 commits intomainfrom
users/klga/datastore-fix
Open

fix: wait for data cleanup before attempting load#678
klga wants to merge 2 commits intomainfrom
users/klga/datastore-fix

Conversation

@klga
Copy link
Copy Markdown
Collaborator

@klga klga commented Apr 1, 2026

edits PlayerDataStoreService.PromiseDataStore to use new method PlayerDataStoreManager.PromiseDataStore instead of GetDataStore.

new method PlayerDataStoreManager.PromiseDataStore will resolve with the datastore object. if previous session data is still cleaning up or saving, it will wait for this to complete before fetching the datastore instead of returning nil

@klga klga self-assigned this Apr 1, 2026
@klga klga temporarily deployed to integration April 1, 2026 16:37 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Deploy Results

ℹ️ No tests to run

No changed packages with deploy targets were discovered for this PR.

View logs

Test Results

Package Status Try it
@quenty/datastore ✅ Passed (3/3) (15.7s) Open in Roblox
@quenty/secrets ✅ Passed (2/2) (15.7s) Open in Roblox
@quenty/chatproviderservice ✅ Passed (3/3) (15.7s) Open in Roblox
@quenty/settings ✅ Passed (5/5) (15.7s) Open in Roblox
@quenty/settings-inputkeymap ✅ Passed (1/1) (15.7s) Open in Roblox

5 tested, 5 passed, 0 failed in 15.8s · View logs


if self._removing[userId] then
return Promise.defer(function(resolve)
while self._removing[userId] do
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very paranoid, but can we add a if-statement if we yield for longer than 15s removing we should warn that it took > 15s to remove and reject the promise? That will stop us from leaking these removal threads.

Otherwise we may end up in a scenario where something fails to fully remove a datastore and then we stop the player from being able to join, and we'll never get clear errors, thus leaking the server forever.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated here: c4e5a27

how is this looking?

@klga klga deployed to integration April 2, 2026 17:04 — with GitHub Actions Active
@klga klga requested a review from Quenty April 2, 2026 17:06
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.

2 participants