diff --git a/CHANGELOG.md b/CHANGELOG.md index bb89619..42a041a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - Grant method was added for `*_ready_buffer` spaces (#237). +- Attempt to index a nil value if box.info.replication array has gaps. ## [1.4.2] - 2024-08-10 diff --git a/queue/abstract/queue_state.lua b/queue/abstract/queue_state.lua index b61b531..289a7d3 100644 --- a/queue/abstract/queue_state.lua +++ b/queue/abstract/queue_state.lua @@ -47,8 +47,9 @@ local function max_lag() local n_replica = table.maxn(box.info.replication) for i = 1, n_replica do - if box.info.replication[i].upstream then - local lag = box.info.replication[i].upstream.lag + local replica = box.info.replication[i] + if replica and replica.upstream then + local lag = replica.upstream.lag if lag > max_lag then max_lag = lag end