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

fix: live-array delete sync should not clear the set on length match #8927

Merged
merged 3 commits into from
Sep 28, 2023

Conversation

runspired
Copy link
Contributor

@runspired runspired commented Sep 27, 2023

test from #8926
resolves #8924

adds test for unloadAll not fully cleaning up

The rough issue is that if all records are removed and the same number re-added before the array has synced we were then fully clearing membership which would make the next sync after this fail to work properly.

e.g.

arr.length; // 2
arrSet.size; // 2
<add> C
<add> D
<rem> A
<rem> B

if (rem.length === arr.length) { arrSet.clear() }

arr.length; // 2
arrSet.size; // 0

@runspired runspired added 🎯 canary PR is targeting canary (default) 🏷️ bug This PR primarily fixes a reported issue labels Sep 27, 2023
@runspired runspired changed the title fix: add test for unloadAll not fully cleaning up fix: live-array delete sync should not clear the set on length match Sep 28, 2023
@runspired runspired merged commit d8f5fd7 into main Sep 28, 2023
19 of 21 checks passed
@delete-merged-branch delete-merged-branch bot deleted the main-unload-all branch September 28, 2023 04:58
@runspired runspired added 🎯 release PR should be backported to release 🎯 lts The PR should be backported to the most recent LTS labels Sep 28, 2023
runspired added a commit that referenced this pull request Sep 28, 2023
…8927)

* fix: add test for unloadAll not fully cleaning up

* fix

* fix lint
runspired added a commit that referenced this pull request Sep 28, 2023
…8927)

* fix: add test for unloadAll not fully cleaning up

* fix

* fix lint
runspired added a commit that referenced this pull request Sep 28, 2023
…8927) (#8926)

* fix: add test for unloadAll not fully cleaning up

* fix

* fix lint
runspired added a commit that referenced this pull request Sep 28, 2023
…8927) (#8929)

* fix: add test for unloadAll not fully cleaning up

* fix

* fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎯 canary PR is targeting canary (default) 🎯 lts The PR should be backported to the most recent LTS 🎯 release PR should be backported to release 🏷️ bug This PR primarily fixes a reported issue
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[4.12.3] Bug: Loading / unloading the same resource multiple times results in lingering reference in cache
1 participant