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

tarantool / crud / 5199459215

pending completion
5199459215

push

github

DifferentialOrange
Release 1.2.0

Overview

  This release add two new flags: `noreturn` to ignore return values
  excessive transfer and encoding/decoding for insert/replace/etc
  (performance improvement up to 10% for batch requests) and
  `fetch_latest_metadata` to force fetching latest space format metadata
  right after a live migration (performance overhead may be up to 15%).

New features
  * Add `noreturn` option for operations:
    `insert`, `insert_object`, `insert_many`, `insert_object_many`,
    `replace`, `replace_object`, `replace_many`, `insert_object_many`,
    `upsert`, `upsert_object`, `upsert_many`, `upsert_object_many`,
    `update`, `delete` (#267).

Bugfixes
  * Crud DML operations returning stale schema for metadata generation.
    Now you may use `fetch_latest_metadata` flag to work with latest
    schema (#236).

1 of 1 new or added line in 1 file covered. (100.0%)

4549 of 4888 relevant lines covered (93.06%)

18261.17 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/crud/common/stash.lua
1
---- Module for preserving data between reloads.
2
-- @module crud.common.stash
3
--
4
local dev_checks = require('crud.common.dev_checks')
404✔
5
local utils = require('crud.common.utils')
404✔
6

7
local stash = {}
404✔
8

9
--- Available stashes list.
10
--
11
-- @tfield string cfg
12
--  Stash for CRUD module configuration.
13
--
14
-- @tfield string stats_internal
15
--  Stash for main stats module.
16
--
17
-- @tfield string stats_local_registry
18
--  Stash for local metrics registry.
19
--
20
-- @tfield string stats_metrics_registry
21
--  Stash for metrics rocks statistics registry.
22
--
23
-- @tfield string select_module_compat_info
24
--  Stash for select compatability version registry.
25
--
26
stash.name = {
404✔
27
    cfg = '__crud_cfg',
28
    stats_internal = '__crud_stats_internal',
29
    stats_local_registry = '__crud_stats_local_registry',
30
    stats_metrics_registry = '__crud_stats_metrics_registry',
31
    ddl_triggers = '__crud_ddl_spaces_triggers',
32
    select_module_compat_info = '__select_module_compat_info',
33
}
404✔
34

35
--- Setup Tarantool Cartridge reload.
36
--
37
--  Call on Tarantool Cartridge roles that are expected
38
--  to use stashes.
39
--
40
-- @function setup_cartridge_reload
41
--
42
-- @return Returns
43
--
44
function stash.setup_cartridge_reload()
404✔
45
    local hotreload_supported, hotreload = utils.is_cartridge_hotreload_supported()
385✔
46
    if not hotreload_supported then
385✔
47
        return
×
48
    end
49

50
    for _, name in pairs(stash.name) do
3,080✔
51
        hotreload.whitelist_globals({ name })
2,310✔
52
    end
53
end
54

55
--- Get a stash instance, initialize if needed.
56
--
57
--  Stashes are persistent to package reload.
58
--  To use them with Cartridge roles reload,
59
--  call `stash.setup_cartridge_reload` in role.
60
--
61
-- @function get
62
--
63
-- @string name
64
--  Stash identifier. Use one from `stash.name` table.
65
--
66
-- @treturn table A stash instance.
67
--
68
function stash.get(name)
404✔
69
    dev_checks('string')
86,039✔
70

71
    local instance = rawget(_G, name) or {}
86,039✔
72
    rawset(_G, name, instance)
86,039✔
73

74
    return instance
86,039✔
75
end
76

77
return stash
404✔
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