Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.remove() on instance that has old values doesn't delete everything #182

Open
maritz opened this issue Apr 7, 2022 · 1 comment
Open

Comments

@maritz
Copy link
Owner

maritz commented Apr 7, 2022

When an instance is removed, it only removes indices/uniquelocks for the values that have been loaded into that instance.

A static .remove() (aka with an unloaded instance or on the static class) does a load immediately before removing and thus rarely runs into this issue, but it still isn't atomic.

Instead a more thorough live search of ids in all indices has to be performed. This is costly, so it would also be a good target for future improvements by making it a lua script.

@maritz
Copy link
Owner Author

maritz commented Apr 7, 2022

Another more "atomic" way would be to create a lock immediately on remove and then do a more costly SCAN iteratively.

Also possibly removing the on-instance .remove() in favor of always using a static one that requires an id attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant