• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / tarantool / 21990384677
88%

Build:
DEFAULT BRANCH: master
Ran 13 Feb 2026 02:41PM UTC
Jobs 1
Files 527
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Feb 2026 02:26PM UTC coverage: 87.633% (+0.02%) from 87.614%
21990384677

push

github

locker
box: implement Lua call/eval over iproto for application threads

This commit lets a network client specify a thread id to forward
a call/eval request to. To achieve that, we have to initialize
a minimal Lua state in each application threads. We do that by making
the tarantool_L global variable thread-local and factoring out
tarantool_lua_init_minimal() from tarantool_lua_init() for use in
application threads. The minimal initialization includes setting
ctype ids for all our custom Lua types, such as decimal and datetime,
because we need them for MsgPack serialization. These ctype ids are
made thread-local as well. The only exception is tuple because
tuple formats can't be used in any thread except tx. We explicitly
override the tuple decoder to return a plain table instead of a tuple
object if used in a non-tx thread, see luamp_decode_extension_box().

To safely use the box Lua call/eval infrastructure in any thread,
we have to fix a few things:

 1. execute_lua_refs and call_serializer_no_ext have to be made
    thread-local because they depend on the Lua state.
 2. Apart from setting execute_lua_refs and call_serializer_no_ext,
    box_lua_call_init() registers an internal box library and sets
    a trigger on alter of the _func system space. Apparently, we can't
    do that in application threads.
 3. get_call_serializer() uses current_session(), which creates a new
    session object if the current fiber doesn't have a session. Sessions
    aren't thread-safe and we don't set them for fibers running in
    application threads so we switch to fiber_get_session(). We also
    add an explicit check that this is an IPROTO session because for
    other sessions IPROTO feature bits are undefined. The latter is
    merely for code clarity because Lua call/eval are executed only
    from IPROTO.

This commit completes the core part of the application threads
infrastructure.

Closes #12259

NO_DOC=internal
NO_CHANGELOG=internal

70437 of 118503 branches covered (59.44%)

109 of 113 new or added lines in 7 files covered. (96.46%)

593 existing lines in 19 files now uncovered.

105934 of 120883 relevant lines covered (87.63%)

1406548.48 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
96.11
0.1% src/box/iproto.cc

Uncovered Existing Lines

Lines Coverage ∆ File
1
89.68
-0.4% src/box/lua/session.c
1
95.0
-0.1% src/box/replication.cc
1
95.74
1.06% src/box/vy_range.c
1
96.55
-1.15% src/lib/core/histogram.c
1
95.24
-1.59% src/lib/small/include/small/quota.h
1
91.68
0.0% src/lib/swim/swim.c
2
93.77
-0.29% src/box/memtx_space.c
2
91.56
-0.21% src/box/vy_scheduler.c
2
97.15
-0.2% src/lib/msgpuck/msgpuck.h
4
94.2
0.0% src/box/iproto_constants.h
4
95.44
0.07% src/box/lua/init.c
6
95.2
-1.25% src/box/vy_read_iterator.c
6
92.64
-1.18% src/box/xrow_update_field.c
12
85.37
0.0% src/box/xrow.h
20
95.85
0.0% src/lua/msgpack.c
41
97.3
0.02% src/box/lua/net_box.c
71
96.11
0.1% src/box/iproto.cc
164
89.21
0.05% src/box/xrow.c
253
91.54
0.09% src/box/box.cc
Jobs
ID Job ID Ran Files Coverage
1 21990384677.1 13 Feb 2026 02:41PM UTC 527
87.63
GitHub Action Run
Source Files on build 21990384677
  • Tree
  • List 527
  • Changed 40
  • Source Changed 0
  • Coverage Changed 40
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 5fe44d84 on github
  • Prev Build on master (#21947434832)
  • Next Build on master (#22066226270)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc