GetAsync does not deplete GetSortedAsync budget when called on an OrderedDataStore

This page indicates that using :GetAsync() on an OrderedDataStore should deplete the budget for Enum.DataStoreRequestType.GetSortedAsync.

That seems to not be the case. Using GetSortedAsync() depletes it, but using GetAsync() depletes the budget for, well, GetAsync…

The question is: am I missing something here?
I wouldn’t like to mess up DataStore request queueing.

Please see here for any data store limits.

GetAsync is inhertied from GlobalDataStore where as GetSortedAsync is defined in OrderedDataStore.

The Roblox API is not the best at showing hierarchy but OrderedDataStore inherits from GlobalDataStore.
image

SetAsync() and IncrementAsync() are also inherited from GlobalDataStore but they seem to have a separate SetIncrementOrderedAsync budget when working with an OrderedDataStore.

Is that just inconsistent or is something else going on?

1 Like

IncrementAsync is a “get then set” though it is not documented on the api if this is an atomic action.

So the operation cost is greater than SetAsync which inserts or replaces which can often be done in one database action e.g. for mysql INSERT … ON DUPLICATE KEY UPDATE.