Add sync locking for Team Create (#590)

* Add sync locking

* Steal lock from users who left without releasing

* Do not remove lock as unknown instance

* Don't delete non Archivable instance
This commit is contained in:
boatbomber
2022-08-08 01:08:55 -07:00
committed by GitHub
parent 05adb82dda
commit 4cb49c7825
2 changed files with 68 additions and 0 deletions

View File

@@ -115,6 +115,12 @@ local function diff(instanceMap, virtualInstances, rootId)
local childId = instanceMap.fromInstances[childInstance]
if childId == nil then
if childInstance.Archivable == false then
-- We don't remove instances that aren't going to be saved anyway,
-- such as the Rojo session lock value.
continue
end
-- This is an existing instance not present in the virtual DOM.
-- We can mark it for deletion unless the user has asked us not
-- to delete unknown stuff.