-
Notifications
You must be signed in to change notification settings - Fork 43
Memtx transactions in depth #399
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
Comments
Since this discussion we have added fiber.new() function, which creates a fiber w/o scheduling it for execution (however everything that were said re fiber.create() are still actual). We also start to raise an exception is case of transaction abort with yield: tarantool/tarantool@131121c (before this a transaction was silently rolled back). My initial point was about documentation re transactions in memtx: how they are connected with fiber yield, what is implicit and explicit yield (don't sure we should draw a line here in the docs), why I cannot commit a transaction when working in a console, why I sometimes can yield after box.begin() and the transaction will not rolled back (it is before first write). The documentation should answer those questions. Don't know whether it is so now (didn't look a long time to this part). Other questions from the dialog are unrelevant, but I would file its own issues for them (if there are no any). We need to clarify how box.once() should be used and where pitfalls here. We should give a general rule how to do a guess whether a function may yield (important note: the same function may yield or don't yield depending of certain conditions). |
We looked at this again with @Onvember. Q: How they [transactions] are connected with fiber yield? Already answered:
Q: What is implicit and explicit yield (don't sure we should draw a line here in the docs)? Already answered:
Q: Why I cannot commit a transaction when working in a console? No answer, let's describe it. Q: Why I sometimes can yield after box.begin() and the transaction will not rolled back (it is before first write)? This is missed in the doc at all. I still think that the article about transactions is hard to being understand by a person who is new in tarantool. However I don't sure how to and whether it is possible to make it better. I propose to also ask @Mons when he'll return from the vacation, maybe he has ideas. At least things becomes a way better when a yield start to raise an explicit error when it is in memtx transaction (on commit): now it is possible to experiment around and get the exact rollback reason. |
It's time to translate these notes |
* gh-399 translation * Apply suggestions from code review Co-authored-by: Elena Shebunyaeva <[email protected]> * update-po Co-authored-by: Elena Shebunyaeva <[email protected]>
* gh-399 translation * Apply suggestions from code review Co-authored-by: Elena Shebunyaeva <[email protected]> * update-po Co-authored-by: Elena Shebunyaeva <[email protected]>
* gh-399 translation * Apply suggestions from code review Co-authored-by: Elena Shebunyaeva <[email protected]> * update-po Co-authored-by: Elena Shebunyaeva <[email protected]>
* gh-399 translation * Apply suggestions from code review Co-authored-by: Elena Shebunyaeva <[email protected]> * update-po Co-authored-by: Elena Shebunyaeva <[email protected]>
* gh-399 translation * Apply suggestions from code review Co-authored-by: Elena Shebunyaeva <[email protected]> * update-po Co-authored-by: Elena Shebunyaeva <[email protected]>
There is concern that the memtx transaction mechanism is more complex than one can think after reading our docs. So, the expectation of a person trying to understand the transaction mechanism will broken on the reefs of reality again and again.
This is the excerpt from the tarantool’s English chat in Telegram (2018-02-13), the talk starts from an another topic:
The text was updated successfully, but these errors were encountered: