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 write requests idempotent for primary replicas #2198

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
4 changes: 2 additions & 2 deletions src/replica/bulk_load/replica_bulk_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ void replica_bulk_loader::check_ingestion_finish()
// checkpoint, to gurantee the condition above, we should pop all committed mutations in
// prepare list to gurantee learn type is LT_APP
mutation_ptr mu = _replica->new_mutation(invalid_decree);
mu->add_client_request(RPC_REPLICATION_WRITE_EMPTY, nullptr);
mu->add_client_request(nullptr);
_replica->init_prepare(mu, false, true);
_replica->_primary_states.ingestion_is_empty_prepare_sent = true;
}
Expand All @@ -727,7 +727,7 @@ void replica_bulk_loader::handle_bulk_load_succeed()
// send an empty prepare again to gurantee that learner should learn from checkpoint
if (status() == partition_status::PS_PRIMARY) {
mutation_ptr mu = _replica->new_mutation(invalid_decree);
mu->add_client_request(RPC_REPLICATION_WRITE_EMPTY, nullptr);
mu->add_client_request(nullptr);
_replica->init_prepare(mu, false, true);
}
}
Expand Down
Loading
Loading