apache / apache/incubator-pegasus

feat: support Duplication to send non-idempotent write operations

Open
#2,379 0 comments 0 reactions 0 assignees View on GitHub
type/enhancement
Dominant language
C++
Stars
2.1k
Forks
328
PR merge metrics
No merged PRs in 30d

Description

## Feature Request

**Is your feature request related to a problem? Please describe:**
For some tables with duplication enabled, blocking non-idempotent writes is not strictly required in production.

Duplication does not support non-idempotent write operations (INCR, CHECK_AND_SET, CHECK_AND_MUTATE)
In `mutation_batch::add_mutation_if_valid`, all non-idempotent writes are skipped:
```
if (!task_spec::get(update.code)->rpc_request_is_write_idempotent) {
continue;
}
```
In replica::need_reject_non_idempotent, non-idempotent writes are rejected:
```
return !spec->rpc_request_is_write_idempotent;
```

**Describe the feature you'd like:**
Support Duplication to send non-idempotent write operations (INCR, CHECK_AND_SET, CHECK_AND_MUTATE).

Contributor guide

Open the contributing guide

Research direction

Start by locating mutation_batch::add_mutation_if_valid and replica::need_reject_non_idempotent, the entry points named in the issue, and trace how duplication handles non-idempotent operations. Done means Duplication can send INCR, CHECK_AND_SET, and CHECK_AND_MUTATE instead of skipping or rejecting them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.