tarantool / tarantool/doc

WAL GC of anonymous replicas

Open
#4,670 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.3 iproto reference wal
Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Dev. issue: https://github.com/tarantool/tarantool/issues/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 https://github.com/tarantool/tarantool/commit/d26f574f8dbad67378cd047f1b9a9a1fec033487.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the box.ctl, replication, and persistence documents linked under Root document. Document box.ctl.replica_gc(uuid), box.info.replication_anon(), replication_anon_ttl, and the IPROTO_FETCH_SNAPSHOT and IPROTO_SUBSCRIBE behavior, including where anonymous replicas are mentioned. Done means the new APIs, timeout, and protocol updates are covered in the relevant documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.