Reproduction Steps
Execute the following in a blank published place:
local DataStoreService = game:GetService("DataStoreService")
local Store = DataStoreService:GetDataStore("Test")
Store:SetAsync("Test", true)
local function onUpdate()
print("Onupdate called")
end
Store:OnUpdate("Test", onUpdate)
while true do
wait(5)
print("Getting value")
Store:GetAsync("Test")
end
Expected Behavior
Previously, OnUpdate would be called only when the value is changed, or the first time GetAsync is called on the key. The output would have beeen:
Getting value
Onupdate called
Getting value
Getting value
Getting value
. . .
Actual Behavior
Now, OnUpdate is called after any call to GetAsync. The output is:
Getting value
Onupdate called
Getting value
Onupdate called
Getting value
Onupdate called
Getting value
. . .
This is causing my game to crash itself constantly, because GetUpdate was used to check for a server shutdown signal sent from studio via DataStore (since MessagingService is not available from studio).
Issue Area: Engine
Issue Type: Other
Impact: Moderate
Frequency: Constantly
Date First Experienced: 2021-09-23 08:09:00 (-04:00)