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

tarantool / tarantool / 15273888343
88%

Build:
DEFAULT BRANCH: master
Ran 27 May 2025 11:33AM UTC
Jobs 1
Files 519
Run time 3min
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

27 May 2025 11:19AM UTC coverage: 87.528% (+0.05%) from 87.479%
15273888343

push

github

locker
box: add format_object field to spaces

Add a `format_object` field  to spaces that returns the associated
`box.tuple.format` object. This enables users to access tuple format
metadata and invoke methods like `validate()` without creating or
inserting a tuple.

The `format_object` field is not available for spaces accessed over
net.box, because creating it would trigger C-level validation of
field types and collation IDs on the client. If the format references
a field type unknown to the client or a collation ID that isn’t
present locally, an error will be raised during schema installation.

Editing tests:

The `format_object` method  creates references to `tuple_format` for
space object via `tuple_format_ref`. These references can be held by
spaces remaining in memory (for example, in the global space table),
especially if other tests create spaces.

In `gh_4693_formats_for_standalone_tuples_test` added an initial call to
`collectgarbage()` to clear the tuple format pool before creating new
`tuple_formats`.

In `net.box_reuse_tuple_formats_gh-6217.test` increased the
`ERRINJ_TUPLE_FORMAT_COUNT` limit from 100 to 113. Sine initially more
than 100 tuple formats are created in the session due to the links help
by the `format_object` method. Increasing the limit allows you to take
into account existing formats.

In `war_off/alter.test` added explicit deletion of references, which
allows the Lua garbage collector to free object of spaces and their
format_object.

Closes #9979

@TarantoolBot document
Title: Add format_object field to spaces
Since: 3.5

The `format_object` field returns the `box.tuple.format` object associated
with the space’s format. It provides the same API as `box.tuple.format`,
including `:validate()` and other.

Example:
```lua
space = box.schema.space.create('test', {
    format = {
        {name = 'id', type = 'unsigned'},
        {name = 'name', type = 'string'}
    }
})

space.format_object:validate({123, 'example'})
```

70467 of 124187 branches covered (56.74%)

11 of 11 new or added lines in 2 files covered. (100.0%)

341 existing lines in 9 files now uncovered.

103626 of 118392 relevant lines covered (87.53%)

2772820.35 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
95.66
-0.12% src/box/replication.cc
1
87.5
-1.59% src/box/xlog.h
1
91.68
-0.11% src/lib/swim/swim.c
1
22.62
-0.02% src/lib/uri/uri_parser.c
2
94.22
-0.39% src/lua/fiber.c
3
91.32
0.4% src/box/box.cc
3
97.05
-0.1% src/lib/msgpuck/msgpuck.h
36
95.57
0.1% src/box/space.c
293
87.44
0.07% src/box/alter.cc
Jobs
ID Job ID Ran Files Coverage
1 15273888343.1 27 May 2025 11:33AM UTC 519
87.53
GitHub Action Run
Source Files on build 15273888343
  • Tree
  • List 519
  • Changed 29
  • Source Changed 0
  • Coverage Changed 29
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • cf1c250e on github
  • Prev Build on master (#15269661732)
  • Next Build on master (#15274308610)
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