Skip to content

Commit

Permalink
test_run.lua: add ignore_zero option to get_vclock
Browse files Browse the repository at this point in the history
Sometimes we don't care about zero component of the vclock, for example
we want to ignore it when waiting for replica sync, using vclock (don't
care about local spaces).
  • Loading branch information
grafin committed Jan 17, 2023
1 parent 5a94f95 commit e9614f9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test_run.lua
Expand Up @@ -79,8 +79,13 @@ local function wait_lsn(self, waiter, master)
end
end

local function get_vclock(self, node)
return self:get_param(node, 'vclock')[1]
local function get_vclock(self, node, opts)
local opts = opts or {}
local vclock = self:get_param(node, 'vclock')[1]
if opts.ignore_zero then
vclock[0] = nil
end
return vclock
end

local function wait_vclock(self, node, to_vclock)
Expand Down

0 comments on commit e9614f9

Please sign in to comment.