Skip to content

core: failed to start if box.info.replication with gaps #240

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions queue/abstract/queue_state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading