line / line/centraldogma

Retry idempotent operations automatically

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

Nobody has claimed this yet.

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

Description

There are various situations where an operation can fail:

- A read operation may fail when a client attempts to access the revision in a replica with replication delay. In this case, the failure can be easily recovered by retrying after a small delay.
- A replica may go offline due to some reason (e.g. machine dead, process killed, ...) and thus an operation may fail unexpectedly. If the operation is a read operation, we can just retry against another replica.

Currently, the client library exposes the situations mentioned above to our users as they are, forcing them to implement the recovery and retry logic by themselves. `centraldogma-client` should take care of them so that they don't have to.

We may also want to insert an artificial delay into `watchRepository()` or `watchFile()` operation so that the successive read operations have less chance of getting `RevisionNotFoundException`, as well as implementing the forementioned automatic retry mechanism.

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 by tracing the centraldogma-client paths for watchRepository(), watchFile(), and read operations, including where RevisionNotFoundException is exposed. Determine which idempotent failures and replica responses are in scope, then add focused tests that define retry behavior and completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.