Data loss starting two days ago

Currently my data system attempts to re-load a player’s data if GetAsync() fails. I’ll have to disable the load retries until caching is removed.

1 Like

I personally can’t stand not doing this, but you do run into that potential issue of sending to many requests, so be very weary of using HTTPService for saving data, perhaps save data when the game closes, and load it on the game start.

This seems like a really strange, and potentially dangerous, edge-case. Is this intentional or a bug?

Wouldn’t it make more sense for it to error again, instead of returning nil when there’s no successfully cached data?

12 Likes

Not sure if intentional or bug (I imagine a bug)? Would love to see roblox engineer’s input on this.

2 Likes

If GetAsync caching is the problem… Just throw it out the window and use UpdateAsync to grab data since it returns latest data and doesn’t cache. Furthermore, it suits the usecase of most developers better because if they use UpdateAsync to store data, when players hop servers the call to grab data will respect the queue of data saves in the last session.

Just to be clear, UpdateAsync has a callback function that gets fed the argument of an old value, but UpdateAsync itself returns the newest value after it finishes.

PS: You don’t want to use SetAsync to save player profiles to begin with + UpdateAsync can be used to create player profile handling code that can be updated during playtime.

The very least, I hope this can be a temporary solution to our problems.

4 Likes

Would you mind posting this as a reply on this thread for visibility until it is addressed? I would add it to the OP, but sadly I am right at the character limit:

I have moved this to Engine Bugs for visibility.

YES. This has happened to multiple of my users on the 3rd of January and apparently once more since. I haven’t changed my datastore code and I’ve never experienced full data loss like this.
I’ll try what Belzebass said about not requesting data too quick if it fails, but getting a false return of datastore being nil should never be possible

Just do

pcall(function()
local data = DataStore:UpdateAsync("key", function(old_value) return old_value end)
end)
1 Like

@Belzebass Do you have reproduction steps or at least an example of the type of throttling/error for which this happens?

Swordburst 2 started getting a lot of reports of data loss as of Friday (and they stopped after this). We hadn’t updated the game within 2 days prior to the influx of reports.

Our developer console in-game has a couple warnings of throttling, yet our DataStore budget tab shows our budget is at 570+, so why are we being throttled?

I believe Royale High switched to using custom datastores due to data loss issues as well. It seems to be more prevalent in games with teleportservice.

No repo, dev relations looked and said that (In their experience) that it was the most likely the case.

same, no clue what to do at this point.

We’ve also been having unexplained data loss issues in our game. No errors and it’s not consistent at all. Looks like it might be a Roblox bug rather than our own system

1 Like

When I joined my game to test the issue people were having with their data not loading, my own data loaded in as inexistent and the server assumed I was a brand new player(how could it know the datastore request was wrong?) This is definitely something roblox has changed, because Ive never experienced this before.

1 Like

That’s unrelated to this issue – that would be because you are attempting to write to keys within the 6 second write cooldown. Review this section of this thread: https://devforum.roblox.com/t/details-on-datastoreservice-for-advanced-developers/175804#heading--req

EDIT: seems unrelated, but if you think it is not unrelated, please DM engineering with your datastore framework so they can confirm

Replcaing GetAsync with UpdateAsync didn’t help. In fact, I have a friend developer who doesn’t even use UpdateAsync, uses datastores in a similar fashion to me and experiences no data loss whatsoever…

I have a feeling UpdateAsync is broke…

I’m not dropping the chance that I’m just a really bad dev… I just don’t think I can fix a script that worked completely fine for almost 2 years.

I’m noticing a lot of developers getting spammed with these messages who don’t believe they should be :eyes:

1 Like

If you are experiencing the issue and think you are dealing correctly with the write cooldown and no chance of running out of budget, you should DM Seranok / RoughSphereBlox the datastore framework so they can confirm it’s not user error and investigate what could be causing it (if you are comfortable with sharing it with engineering).

A few days ago, a lot of reports came in about “data loss” in Strucid but after I did some investigation, it appears that data isn’t actually lost but rather just not loading. Thankfully, Strucid had a backup DataStore which I was able to use to restore players’ data after their normal saves were overwritten by the new saves.