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

Konstantin Osipov kostja.osipov at gmail.com
Fri Nov 29 08:30:59 MSK 2019


* 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.
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 know of no good reason why yields break traces, and if they stop
doing that, we can switch everything to FFI. 

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


-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list