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 #2534 #2552

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix #2534 #2552

wants to merge 3 commits into from

Conversation

Joy-less
Copy link

@Joy-less Joy-less commented Oct 4, 2024

This fixes issue #2534 where updating a collection during an iteration fails in shared mode.

Previously, functions like Collection.Update() would always open and close the database, causing a dispose error when recursion was used. Now, it only closes the database if it was responsible for opening it.

I'm not sure that this is the best way to solve the problem. It might be a good idea to open a transaction whenever iterating a collection instead. I would have expected this issue to be more impactful.

@pictos
Copy link
Collaborator

pictos commented Oct 4, 2024

Hey @Joy-less thanks for your fix, do you mind to add a recursion unit test as well? Since you described it on the PR description I think would be great to validate that this changes fix it and avoid regressions in future

@Joy-less
Copy link
Author

Joy-less commented Oct 5, 2024

@pictos I added the recursion tests. I also updated the test packages which were way out-of-date.

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

Successfully merging this pull request may close these issues.

2 participants