Skip to content
Closed
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
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Changed

- Update ``membership`` dependency to `2.4.6 <https://github.com/tarantool/membership/releases/tag/2.4.6>`_.

- Expelled instances are now marked as ``left`` in ``membership``.

-------------------------------------------------------------------------------
[2.13.0] - 2024-11-28
-------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions cartridge/confapplier.lua
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ local function apply_config(clusterwide_config)
if failover.is_leader() then
for _, uuid, _ in fun.filter(topology.expelled, topology_cfg.servers) do
box.space._cluster.index.uuid:delete(uuid)
membership.mark_left(topology_cfg.servers[uuid].uri)
end
end

Expand Down
12 changes: 11 additions & 1 deletion test/integration/expel_test.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ g.before_all(function()
datadir = fio.tempdir(),
use_vshard = false,
server_command = helpers.entrypoint('srv_basic'),
cookie = helpers.random_cookie(),
cookie = 'secret', --helpers.random_cookie(),
replicasets = {{
alias = 'A',
roles = {},
Expand Down Expand Up @@ -93,4 +93,14 @@ function g.test_api()
g.A1.net_box.space._cluster:select(),
{{1, g.r1_uuid}, {3, g.r3_uuid}}
)

-- Check explicitly that expelled leader has left membership. Just in case also.

g.cluster:retrying({timeout = 10}, function ()
local ret = g.A1:exec(function()
local membership = require('membership')
return membership.members()
end)
t.assert_equals(ret[g.cluster:server('A-2').advertise_uri].status, 'left', ret)
end)
end
Loading