nezuo / lapis

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

Remove lock from documents that fail to close #46

Closed nezuo closed 1 week ago

nezuo commented 4 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 1 week ago

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

nezuo commented 1 week ago

Closed by #66.