[
https://issues.apache.org/jira/browse/IGNITE-20127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Lapin updated IGNITE-20127:
-------------------------------------
Description:
h3. Motivation
Our transaction protocol assumes that all required request validations, lock
acquisitions and similar activities are performed on a primary replica prior to
command replication, meaning that it's not necessary to await replication for
every request one by one rather it's required to await them all at once in
pre-commit phase. Most of what is required for such all at once await has
already been implemented.
h3. Definition of Done
* It's required to do the command replication in an async manner, meaning that
it's required to return the result to the client right after replication is
triggered. Currently we return replication result in
PartitionReplicaListener#applyCmdWithExceptionHandling and await it in
ReplicaManager#onReplicaMessageReceive
{code:java}
CompletableFuture<?> result = replica.processRequest(request);
result.handle((res, ex) -> {
...
msg = prepareReplicaResponse(requestTimestamp, res);
...
clusterNetSvc.messagingService().respond(senderConsistentId, msg,
correlationId); {code}
> Implement 1rtt RW transaction await logic in pre commit
> -------------------------------------------------------
>
> Key: IGNITE-20127
> URL: https://issues.apache.org/jira/browse/IGNITE-20127
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexander Lapin
> Priority: Major
> Labels: ignite-3, transactions
>
> h3. Motivation
> Our transaction protocol assumes that all required request validations, lock
> acquisitions and similar activities are performed on a primary replica prior
> to command replication, meaning that it's not necessary to await replication
> for every request one by one rather it's required to await them all at once
> in pre-commit phase. Most of what is required for such all at once await has
> already been implemented.
> h3. Definition of Done
> * It's required to do the command replication in an async manner, meaning
> that it's required to return the result to the client right after replication
> is triggered. Currently we return replication result in
> PartitionReplicaListener#applyCmdWithExceptionHandling and await it in
> ReplicaManager#onReplicaMessageReceive
> {code:java}
> CompletableFuture<?> result = replica.processRequest(request);
> result.handle((res, ex) -> {
> ...
> msg = prepareReplicaResponse(requestTimestamp, res);
> ...
> clusterNetSvc.messagingService().respond(senderConsistentId, msg,
> correlationId); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)