line / line/centraldogma

Compact a client-provided commit before storing to ZooKeeper

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

Nobody has claimed this yet.

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

Description

ZooKeeperCommandExecutor currently serializes a `PushCommand` as-is. This can cause unexpectedly large log entry to be stored in ZooKeeper, which has limited capacity. We should:
- Calculate the diff between the changeset provided in a `PushCommand` and the HEAD,
- Perform `Repository.commit() with the calculated diff and
- Store the calculated diff into ZooKeeper.

Such an optimization could reduce the size of a serialized log entry dramatically when a user issues multiple UPSERTs on existing files.

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 at ZooKeeperCommandExecutor and trace how a PushCommand is serialized, how HEAD is obtained, and where Repository.commit() is called. Verify that the calculated diff is used both for the commit and for the ZooKeeper log entry, while preserving the intended UPSERT behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, java
Domain
backend, databases, distributed-systems
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.