nezuo / lapis

A DataStore abstraction library for Roblox
https://nezuo.github.io/lapis/
MIT License
59 stars 10 forks source link

Remove lock from documents that fail to close #46

Closed nezuo closed 2 months ago

nezuo commented 6 months ago

Example implementation:

UpdateAsync(function(oldData)
    if oldData.lockId == document.lockId then
        oldData.lockId = nil
        return oldData
    end

    return nil
end)

As long as the current lock is still the same as the documents, it should be safe to remove it.

nezuo commented 2 months ago

These are the cases a document will fail to close that we should attempt to remove the session lock:

nezuo commented 2 months ago

Closed by #66.