Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksander Klenov <a.a.klenov@ya.ru>
  • Loading branch information
yngvar-antonsson and a1div0 authored Dec 24, 2024
1 parent f6f7c91 commit 9a94218
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cartridge/failover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ local function synchro_promote()
local ok, err = pcall(box.ctl.promote)
fiber.testcancel()
if ok ~= true then
log.error('Failed to promote: %s', err)
log.error('Failed to promote: %s', err or 'unknown')
end
return err
end
Expand All @@ -448,7 +448,7 @@ local function synchro_demote()
local ok, err = pcall(box.ctl.demote)
fiber.testcancel()
if ok ~= true then
log.error('Failed to demote: %s', err)
log.error('Failed to demote: %s', err or 'unknown')
end
return err
end
Expand Down
6 changes: 3 additions & 3 deletions cartridge/failover/raft.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ local function disable()
and box_info.synchro.queue ~= nil
and box_info.synchro.queue.owner ~= 0
and box_info.synchro.queue.owner == box_info.id then
local err = pcall(box.ctl.demote)
if err ~= nil then
log.error('Failed to demote: %s', err)
local ok, err = pcall(box.ctl.demote)
if ok ~= true then
log.error('Failed to demote: %s', err or 'unknown')
end
return err
end
Expand Down

0 comments on commit 9a94218

Please sign in to comment.