Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(make_idempotent): support making incr request idempotent in pegasus_server_write and replication_app_base #2196

Merged
merged 14 commits into from
Feb 21, 2025

Conversation

empiredan
Copy link
Contributor

@empiredan empiredan commented Feb 19, 2025

#2197

To support idempotence, a new interface make_idempotent() is introduced and
an existing interface on_batched_write_requests() is changed for both the classes
pegasus_server_write and replication_app_base. This is different from what we
have done for pegasus_write_service and pegasus_write_service::impl, both of
which provide make_idempotent() and put() by the following PRs:

make_idempotent() for replication_app_base is provided as a virtual function
called by primary replicas, implemented internally by pegasus_server_impl and
pegasus_server_write. on_batched_write_requests for replication_app_base
is the same. It is changed with a new parameter original_request added. It is just
the original request received from the client. It must be an atomic request (i.e. incr,
check_and_set and check_and_mutate) if it is non-null, and used to decide if a
write request is atomic and generate the response corresponding to the atomic write
request.

@github-actions github-actions bot added the cpp label Feb 19, 2025
@empiredan empiredan marked this pull request as ready for review February 20, 2025 09:59
@empiredan empiredan merged commit 6249c13 into apache:master Feb 21, 2025
95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants