diff --git a/sharded_queue/drivers/fifo.lua b/sharded_queue/drivers/fifo.lua index 1e8f3ef..6a07f13 100644 --- a/sharded_queue/drivers/fifo.lua +++ b/sharded_queue/drivers/fifo.lua @@ -74,7 +74,7 @@ end -- put task in space function method.put(args) - local task = box.atomic(function() + local task = box.atomic({txn_isolation = 'read-committed'}, function() local idx = get_index(args) local task_id = utils.pack_task_id( args.bucket_id, @@ -96,7 +96,7 @@ end -- take task function method.take(args) - local task = box.atomic(function() + local task = box.atomic({txn_isolation = 'read-committed'}, function() local task = get_space(args).index.status:min { state.READY } if task == nil or task[3] ~= state.READY then return diff --git a/sharded_queue/drivers/fifottl.lua b/sharded_queue/drivers/fifottl.lua index f65097b..ebdb5f4 100644 --- a/sharded_queue/drivers/fifottl.lua +++ b/sharded_queue/drivers/fifottl.lua @@ -233,7 +233,7 @@ function method.put(args) local ttr = args.ttr or args.options.ttr or ttl local priority = args.priority or args.options.priority or 0 - local task = box.atomic(function() + local task = box.atomic({txn_isolation = 'read-committed'}, function() local idx = get_index(args.tube_name, args.bucket_id) local next_event @@ -301,7 +301,7 @@ end function method.take(args) - local task = box.atomic(take, args) + local task = box.atomic({txn_isolation = 'read-committed'}, take, args) if task == nil then return end if args.extra and args.extra.log_request then