[Tarantool-patches] [PATCH] Move txn from shema to a separate module (use C API instead of FFI)

Igor Munkin imun at tarantool.org
Fri Nov 29 20:43:52 MSK 2019


Kostja,

On 29.11.19, Konstantin Osipov wrote:
> * Igor Munkin <imun at tarantool.org> [19/11/28 21:39]:
> > > This is actually quite simple - we could easily call a LuaJIT hook
> > > whenever switching a fiber, to make sure that it carefully
> > > switches the internals as well. Mike Pall refused to cooperate on
> > > the matter, but now we (you) control our own destiny.
> > 
> > Unfortunately, I haven't seen the thread where the subj is discussed
> > with Mike Pall, but the approach you proposed doesn't seem to be a
> > convenient one, however it still solves a problem (as does the move to
> > use Lua-C API for the code with possible Lua VM re-entrance underneath).
> > 
> > The major flaw I see in this solution, is introducing the dependency on
> > the JIT interface into Tarantool internals. There is already one
> > dependency on LuaJIT-2.1.0 presented with internal headers usage for
> > several hacks in utils.c. As a result we are not able to simply replace
> > the Lua implementation to try another one (e.g. uJIT conforming
> > LuaJIT-2.0.5) for comparing each other.
> 
> Well, this is not exactly a flaw of the solution, then: it would
> have been a flaw if we had a choice - whether to introduce a
> dependency or not. The dependency is already there, with its
> costs.

I hope to reduce it in the nearest future, since there're lots of
valuable Lua implementations to be tried for Tarantool.

> When we introduced the dependency it was not an arbitrary decision
> either: the strategy has always been that Tarantool will become
> bigger & stronger and will have its own JIT team, so we will be
> able to sustain the costs of tight coupling. This strategy has
> partly materialized with you and Sergos on board of MRG team. 
> 
> Now it's a matter of you guys being bold enough to take one step
> further and integrate LuaJIT with tarantool fibers. 

I really appreciate your words and we will try our best for the product
enhancements. As I mentioned before, we already have some research
aiming to detect FFI sandwiches and prevent the platform failures and
we are definitely going to proceed with it.

> 
> I know of no good reason why yields break traces, and if they stop
> doing that, we can switch everything to FFI. 

I can dump some results to tarantool-discussions on demand.

> 
> This is of course outside the scope of this patch, but is related
> to the policy for FFI vs Lua/C.

Yes, and we should come to a sole one indeed. I guess it will be more
convenient to move our conversation thread to tarantool-discussions and
stop spoiling the review list.

> 
> 
> -- 
> Konstantin Osipov, Moscow, Russia

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list