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

FirstOrDefault causes transactions to be not removed #2483

Closed
PatrickSlamp opened this issue May 20, 2024 · 1 comment
Closed

FirstOrDefault causes transactions to be not removed #2483

PatrickSlamp opened this issue May 20, 2024 · 1 comment

Comments

@PatrickSlamp
Copy link

PatrickSlamp commented May 20, 2024

Version:
5.0.19

Describe the bug:
As shown in the image below when using FirstOrDefault the transaction is not removed, when using ToList() in my case fixed it. When FirstOrDefault is used the yield return causes the ReleaseTransaction to be called. For contex the database on contained a single Tournament object the moment of reporting the bug.

Code to reproduce:
See screenshot.

Expected behavior:
The transaction should be released.

Screenshot:
image

Originally posted by @PatrickSlamp in #2435 (comment)

@PatrickSlamp PatrickSlamp changed the title FirstOrDefault cuases transactions to be not removed FirstOrDefault causes transactions to be not removed May 20, 2024
JKamsker added a commit to JKamsker/LiteDB that referenced this issue Jun 1, 2024
@JKamsker
Copy link
Collaborator

JKamsker commented Jun 4, 2024

This issue has been addressed and fixed in the latest commit.
A new release is coming shortly.
Reopen this issue or open a new one if this issue persists in the upcoming version please.

@JKamsker JKamsker closed this as completed Jun 4, 2024
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

No branches or pull requests

2 participants