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

tarantool / crud / 21292057304

23 Jan 2026 03:47PM UTC coverage: 73.47% (-15.0%) from 88.463%
21292057304

Pull #477

github

ita-sammann
test: dump xlogs and snaps for debug
Pull Request #477: test: attempt to mitigate replication bug on cluster start

1 of 2 new or added lines in 1 file covered. (50.0%)

858 existing lines in 47 files now uncovered.

4251 of 5786 relevant lines covered (73.47%)

55.81 hits per line

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

67.86
/crud/common/map_call_cases/batch_postprocessor.lua
1
local dev_checks = require('crud.common.dev_checks')
19✔
2
local utils = require('crud.common.utils')
19✔
3
local sharding_utils = require('crud.common.sharding.utils')
19✔
4

5
local BasePostprocessor = require('crud.common.map_call_cases.base_postprocessor')
19✔
6

7
local BatchPostprocessor = {}
19✔
8
-- inheritance from BasePostprocessor
9
setmetatable(BatchPostprocessor, {__index = BasePostprocessor})
19✔
10

11
--- Collect data after call
12
--
13
-- @function collect
14
--
15
-- @tparam[opt] table result_info
16
-- Data of function call result
17
-- @tparam[opt] result_info.key
18
-- Key for collecting result
19
-- @tparam[opt] result_info.value
20
-- Value for collecting result by result_info.key
21
--
22
-- @tparam[opt] table err_info
23
-- Data of function call error
24
-- @tparam[opt] function|table err_info.err_wrapper
25
-- Wrapper for error formatting
26
-- @tparam[opt] table|cdata err_info.err
27
-- Err of function call
28
-- @tparam[opt] table err_info.wrapper_args
29
-- Additional args for error wrapper
30
--
31
-- @return[1] boolean early_exit
32
function BatchPostprocessor:collect(result_info, err_info)
19✔
33
    dev_checks('table', {
84✔
34
        key = '?',
35
        value = '?',
36
    },{
42✔
37
        err_wrapper = 'function|table',
38
        err = '?table|cdata',
39
        wrapper_args = '?table',
40
    })
41

42
    if result_info.value ~= nil then
42✔
43
        self.storage_info[result_info.key] = {replica_schema_version = result_info.value[3]}
42✔
44
    end
45

46
    local errs = {err_info.err}
42✔
47
    if err_info.err == nil then
42✔
48
        errs = result_info.value[2]
42✔
49
    end
50

51
    if errs ~= nil then
42✔
UNCOV
52
        for _, err in pairs(errs) do
×
UNCOV
53
            local err_to_wrap = err
×
UNCOV
54
            if err.class_name ~= sharding_utils.ShardingHashMismatchError.name and err.err then
×
UNCOV
55
                err_to_wrap = err.err
×
56
            end
57

UNCOV
58
            local err_obj = err_info.err_wrapper(self.vshard_router, err_to_wrap, unpack(err_info.wrapper_args))
×
UNCOV
59
            err_obj.operation_data = err.operation_data
×
UNCOV
60
            err_obj.space_schema_hash = err.space_schema_hash
×
61

UNCOV
62
            self.errs = self.errs or {}
×
UNCOV
63
            table.insert(self.errs, err_obj)
×
64
        end
65
    end
66

67
    if result_info.value ~= nil and result_info.value[1] ~= nil then
42✔
68
        self.results = utils.list_extend(self.results, result_info.value[1])
56✔
69
    end
70

71
    return self.early_exit
42✔
72
end
73

74
return BatchPostprocessor
19✔
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