Skip to content

CXXCBC-316: Core txn get_optional after query issue #385

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

Merged
merged 2 commits into from
Mar 18, 2023
Merged

Conversation

davidkelly
Copy link
Contributor

When we have removed a doc in this transaction, and then call
get_optional, we expect to just get an empty optional. However, the
handling was raising a transaction_operation_failed. Simple fix - the
get_doc call can return no error, and no document. When that happens
and we are in a get_optional, we should just return the empty optional.

While at it, added some simple get and get_optional tests that were missing. And
added a test reproducing the issue Sergey saw.

When we have removed a doc in this transaction, and then call
get_optional, we expect to just get an empty optional.   However, the
handling was raising a transaction_operation_failed.  Simple fix - the
get_doc call can return no error, and no document.  When that happens
and we are in a get_optional, we should just return the empty optional
@davidkelly davidkelly marked this pull request as ready for review March 17, 2023 21:44
@davidkelly davidkelly requested a review from avsej March 17, 2023 21:45
@avsej avsej merged commit 5c10b1b into main Mar 18, 2023
@avsej avsej deleted the dk/sergey_bug branch March 18, 2023 07:56
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