Closed 4x8Matrix closed 1 year ago
UpdateAsync is specifically chosen here because it has resilience behaviors that GetAsync does not provide. Is it not possible to use GDPR parameters with SetAsync here?
GDPR Tags are not supported in :UpdateAsync
(they are supported in :SetAsync
), I understand the concern for this to be at production level however this is also quite a big feature which would be really good to get implemented.
This is the source ~ and the reason why I call :GetAsync
previous to :SetAsync
https://create.roblox.com/docs/scripting/data/data-stores#set-vs-update
would there be any specific way to articulate this same behavior seen in UpdateAsync?
:ListVersionsAsync
and see what's a viable option? We can never be confident that a key isn't currently attempting to be updated by another server. This could happen because of someone misusing the DataStore2 API (which sucks, but would suck more to break existing games), or data stores being temporarily down and the server retrying while someone else is in game. I'm not confident the current behavior is very great but using UpdateAsync over SetAsync is somewhat common.
I have an alternate suggestion. Can we make it so if the initial get returns nil, then we use SetAsync for the first time, otherwise UpdateAsync?
That's a viable solution!
However, i'm a bit worried about calling the :GetAsync
now then ~ wouldn't this build up the Datastore get request queue? Essentially we're making two get requests?
You wouldn't need to call GetAsync here, we perform an initial get as part of DataStore2
Wrong implementation for GDPR Tags, will be creating a new PR soon refactoring this approach to correctly assign a series of UserIDs.
Context
The Issue https://github.com/Kampfkarren/Roblox/issues/143 was opened but never addressed, this PR is an attempt at addressing this issue.
This PR
:GetAsync
to implement the same behavior as:UpdateAsync
SavingMethods/Standard.lua
to support theuserIds
array Datastore 2.0 provides.