Skip to content

WAL GC of anonymous replicas #4670

Open
@TarantoolBot

Description

@TarantoolBot

Dev. issue: tarantool/tarantool#10755
Product: Tarantool
Since: 3.3.0
Root document:

SME: @ drewdzzz

Details

Connected with #4478, #4479

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:

  1. 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.
  2. IPROTO_SUBSCRIBE - now WAL GC state is unconditionally created for a
    sender, either anonymous or regular.
    Requested by @drewdzzz in tarantool/tarantool@d26f574.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.3iprotoRelated to the iproto protocolreference[location] Tarantool manual, Reference partwal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions