Description
Dev. issue: tarantool/tarantool#10755
Product: Tarantool
Since: 3.3.0
Root document:
- https://www.tarantool.io/en/doc/latest/reference/reference_lua/box_ctl/
- https://www.tarantool.io/en/doc/latest/reference/internals/iproto/replication/
- (?) https://www.tarantool.io/en/doc/latest/platform/storage/persistence/
SME: @ drewdzzz
Details
Now anonymous replicas retain required xlogs just as regular ones.
Since anonymous replicas can suddenly disappear, a new function
box.ctl.replica_gc(uuid)
is introduced. It has an only argument,
UUID of replica that must be a string. If the replica is connected right
now or there is no known replica with such UUID, an error is thrown.
The function can be used to cleanup state of a replica that is gone for
a while: it removes WAL GC state of the given replica and deletes it if it
is anonymous. Regular replicas are not evicted from the cluster. By the
way, there is a function box.info.replication_anon()
that can be used
to list all anonymous replicas so one can deactivate them with the newly
introduced function - we should mention it somewhere around.
Also, anonymous replicas are deactivated automatically if they haven't
been in touch for too long. Expiration timeout can be controlled by the
new box.cfg.replication_anon_ttl
option, the default value is
3600 seconds (1 hour).
IPROTO protocol updates:
- IPROTO_FETCH_SNAPSHOT - is populated with optional
IPROTO_INSTANCE_UUID
key. If it is passed, sender is considered as
a replica and its WAL GC state is registered. If the key is not
passed, behavior is the same as before. - IPROTO_SUBSCRIBE - now WAL GC state is unconditionally created for a
sender, either anonymous or regular.
Requested by @drewdzzz in tarantool/tarantool@d26f574.