-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
FindById leaves open cursors on transaction #1427
Comments
Will leave an open cursor on the transaction (as the enumeration never completes): Will NOT leave an open cursor on the transaction (as the enumeration completes): |
This line currently stops you from running an 'FindById' operation inside of a transaction. |
@clooudch Could you test it with v5.0.1? |
Due to my tests, I can confirm that v5.0.1 fixed the problem. Thanks. |
It seems like the 'FindById' operation on the database (and potentially other operations as well), leave an open cursor on the transaction.
This can easily be reproduced. Just begin a transaction on the database and run a 'FindById' operation on a collection. You will see that you can not commit the transaction as it still contains open cursors.
I think this has something to do with the combination of 'FirstOrDefault' and IEnumerable functions. My guess is that the cursor will only be returned after the enumerator completed and 'FirstOrDefault' will stop the enumerator after the first element.
The text was updated successfully, but these errors were encountered: