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

box.atomic tnx_isolation #3593

Merged
merged 1 commit into from
Aug 1, 2023
Merged

Conversation

andreyaksenov
Copy link
Contributor

@andreyaksenov andreyaksenov commented Jul 21, 2023

  • Added the opts parameter to the box.atomic() function and updated the example to show how to specify the isolation level.
  • Updated description for box.begin() - added the sample with txn_isolation and added the timeout parameter.

@andreyaksenov andreyaksenov linked an issue Jul 21, 2023 that may be closed by this pull request
@andreyaksenov andreyaksenov force-pushed the 2.11-box-atomic-txn-isolation branch 3 times, most recently from 143218c to 7afe03e Compare July 21, 2023 09:54
@andreyaksenov andreyaksenov force-pushed the 2.11-box-atomic-txn-isolation branch 2 times, most recently from 550f32b to b4e8eb0 Compare July 21, 2023 13:38
@andreyaksenov andreyaksenov requested a review from p7nov July 31, 2023 08:17
Copy link
Contributor

@p7nov p7nov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments from my side.
Otherwise LGTM 👍

:param table opts: (optional) transaction options:

* ``txn_isolation`` -- the :ref:`transaction isolation level <txn_mode_mvcc-options>`
* ``timeout`` -- a timeout (in seconds), after which the transactions are rolled back
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the transactions" confuses a bit. Maybe use singular?


:param function-arguments: (optional) arguments passed to the function

:return: the result of the function passed to ``atomic()`` as an argument

**Possible errors:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we add the "timeout exceeded" error?

@andreyaksenov andreyaksenov merged commit e0db7bf into latest Aug 1, 2023
1 check passed
@andreyaksenov andreyaksenov deleted the 2.11-box-atomic-txn-isolation branch August 1, 2023 06:38
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.

Options in box.atomic
3 participants