line / line/centraldogma

Scalable log replay in `ZooKeeperCommandExecutor`

Open
#477 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Java
Stars
668
Forks
135
Avg merge
4d 19h
Merged PRs (30d)
7

Description

`ZooKeeperCommandExecutor` stores and replays replication logs sequentially. `replayLogs()` method, which replays the replication logs, acquires an exclusive lock via `synchronized` keyword to ensure the sequential replay.

However, some commands can be replayed in parallel. For example:

- `SessionCommand`s can be replayed in parallel with other command types.
- `CreateSessionCommand` and `RemoveSessionCommand` must be executed in order, though.
- All other commands can be replayed in parallel as long as they are for the different projects from each other. (We could expand this to repository-level, but it's probably an overkill.)

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 `ZooKeeperCommandExecutor` class and its `replayLogs()` method to understand the current sequential replay and locking behavior. Define and implement safe parallelism while preserving ordering for `CreateSessionCommand` and `RemoveSessionCommand`, and isolating other commands by project; done means replay remains correct under these constraints.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.