[Tarantool-patches] [PATCH v2 3/3] box: remove dead code from box_process_call/eval()

Georgy Kirichenko georgy at tarantool.org
Mon Jan 20 22:21:34 MSK 2020


On Sunday, 19 January 2020 20:32:45 MSK Vladislav Shpilevoy wrote:
> Hi! Thanks for the review!
> 
> On 17/01/2020 18:41, Georgy Kirichenko wrote:
> > On Friday, 17 January 2020 00:54:23 MSK Vladislav Shpilevoy wrote:
> >> box_process_call/eval() in the end check if there is an
> >> active transaction. If there is, it is rolled back, and
> >> an error is set.
> >> 
> >> But rollback is not needed anymore, because anyway in
> >> the end of the request the fiber is stopped, and its
> >> not finished transaction is rolled back. Just setting
> >> of the error is enough.
> > 
> > Hi!
> > 
> >  Thanks for the patch, but I do not think that to remove an explicit
> >  rollback> 
> > is a a good idea because of broken encapsulation - call and eval handlers
> > should not rely on its execution context - a simple fiber, iproto fiber
> > pool member or whatever else. Also I would like to mention that box_call
> > and box_eval are members of the public api and it is not necessary that
> > user will stop a fiber.
> 
> Functions box_call and box_eval don't exist. So I don't understand what you
> are talking about.
> 
> Assume you talked about box_process_call/eval. In that case you are wrong -
> they are not a part of the public API. They are always called from iproto.cc
> only.
Sorry, you are right, I though we already export them.
> Besides, we will need to remove ER_FUNCTION_TX_ACTIVE and all the
> other txn stuff from them anyway after interactive transactions are ready.
This error should be removed only when we are not in context of a sequence 
stream of operations. This is not implemented yet so I think we should not 
change this behavior right now, because I pretty sure we should preserve 
backward compatibility.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.tarantool.org/pipermail/tarantool-patches/attachments/20200120/fb7931f2/attachment.sig>


More information about the Tarantool-patches mailing list