Skip to content

Commit 596558b

Browse files
committed
update check for ro mode in drivers
box.info.ro additionally (in comparison with box.cfg.read_only) uses information about the "orphan" mode and raft state of the instance.
1 parent e4986c5 commit 596558b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

queue/abstract/driver/fifottl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ local function fifottl_fiber(self)
162162
local processed = 0
163163

164164
while true do
165-
if not box.cfg.read_only then
165+
if box.info.ro == false then
166166
local stat, err = pcall(fifottl_fiber_iteration, self, processed)
167167
if not stat and not (err.code == box.error.READONLY) then
168168
log.error("error catched: %s", tostring(err))

queue/abstract/driver/utubettl.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ local function utubettl_fiber(self)
171171
local processed = 0
172172

173173
while true do
174-
if not box.cfg.read_only then
174+
if box.info.ro == false then
175175
local stat, err = pcall(utubettl_fiber_iteration, self, processed)
176176
if not stat and not err.code == box.error.READONLY then
177177
log.error("error catched: %s", tostring(err))

0 commit comments

Comments
 (0)