We will soon be enabling an automatic-retry system to datastore requests.
Things to note:
- When the backend throttles a datastore request and returns a retry-response, developers handle this case by attempting the same request again. With this feature, the RobloxClient will handle this case for you.
- The property DataStoreService.AutomaticRetry has been added to enable or disable the retry behavior. If enabled, requests are marked to use the retry code path when called. Disabling the property will not affect requests that are currently being processed.
- This property will be enabled automatically
While enabled there are a few caveats to take note of:
- In order to prevent stale data from being written to the datastore, we have added guards to how SetAsync and IncrementAsync interact with one another. A new SetAsync request on a key will cancel all queued SetAsync and IncrementAsync requests on that same key. Queued requests are requests that have been called but have not been sent to our backend. This can happen when your requests require a retry or you exceed the throttle limit. It will also block you from starting more IncrementAsync requets on that key. Subsequent SetAsync requests can still go through, and when that happens, it will invalidate any SetAsync requests that are currently queued.
- If the same request has been rejected by the backend five times, the request will be dropped.
-To disable this feature, you can set the AutomaticRetry property by entering the following in the Studio command line and republishing your game.
game:GetService("DataStoreService").AutomaticRetry = false
9/13/2017: We are currently investigating issues resulting in an elevated number of requests. Feature is currently off.