You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Denis Chudov (Jira)" <ji...@apache.org> on 2022/09/09 14:29:00 UTC

[jira] [Updated] (IGNITE-17582) Introduce mutipleReplica ReplicaRequests together with grouped TxCleanupReplicaRequest processing

     [ https://issues.apache.org/jira/browse/IGNITE-17582?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Denis Chudov updated IGNITE-17582:
----------------------------------
    Description: 
h3. Motivation

Within the scope of tx commit process, enlisted partitions are grouped together by primary replica cluster node, however during the tx finish processing brand new TxCleanupReplicaRequest is sent to each partition even colocated ones within same cluster node:

 
{code:java}
public CompletableFuture<Void> cleanup(
        ClusterNode recipientNode,
        List<String> replicationGroupIds,
        UUID txId,
        boolean commit,
        HybridTimestamp commitTimestamp
) {
    // TODO: https://issues.apache.org/jira/browse/IGNITE-17582 Grouping replica requests.
    replicationGroupIds.forEach(groupId -> {
        try {
            replicaService.invoke(
                    recipientNode,
                    FACTORY.txCleanupReplicaRequest()
                            .groupId(groupId)
                            .txId(txId)
                            .commit(commit)
                            .commitTimestamp(commitTimestamp)
                            .build()
            );
        } catch (NodeStoppingException e) {
            throw new TransactionException("Failed to perform tx cleanup, node is stopping.");
        }
    });

    return null;
} {code}
Seems that we may introduce multipleReplicationGroups in addition to single ones that we already have in order to perform such collocated based requests.
h3. Definition of Done
 * General solution for groupping collocated replica requests is introduced.
 * TxCleanupReplicaRequests are grouped on recipient node basis.

h3. Implementation Notes

Generally speaking, it's required to:
 * Introduce new interface  MutipleReplicasReplicaRequest with Collection<String> groupsId() in addition to already existing ReplicaRequest with single String groupId();
 * Implement proper multiple replicas fun out and aggregation(including expcetion handling) of the results within org.apache.ignite.network.NetworkMessageHandler#onReceived
 * Send such new TxCleanupReplicaRequests one per cluster node instead of one per replica, in other words rework org.apache.ignite.internal.tx.impl.TxManagerImpl#cleanup 

 

  was:
h3. Motivation

Within the scope of tx commit process, enlisted partitions are grouped together by primary replica cluster node, however during the tx finish processing brand new TxCleanupReplicaRequest is sent to each partition even colocated ones within same cluster node:

 
{code:java}
public CompletableFuture<Void> cleanup(
        ClusterNode recipientNode,
        List<String> replicationGroupIds,
        UUID txId,
        boolean commit,
        HybridTimestamp commitTimestamp
) {
    // TODO: https://issues.apache.org/jira/browse/IGNITE-17582 Grouping replica requests.
    replicationGroupIds.forEach(groupId -> {
        try {
            replicaService.invoke(
                    recipientNode,
                    FACTORY.txCleanupReplicaRequest()
                            .groupId(groupId)
                            .txId(txId)
                            .commit(commit)
                            .commitTimestamp(commitTimestamp)
                            .build()
            );
        } catch (NodeStoppingException e) {
            throw new TransactionException("Failed to perform tx cleanup, node is stopping.");
        }
    });

    return null;
} {code}
Seems that we may introduce multipleReplicationGroups in addition to single ones that we already have in order to perform such collocated based requests.
h3. Definition of Done
 * General solution for groupping collocated replica requests is introduced.
 * TxCleanupReplicaRequests are grouped on recipient node basis.

h3. Implementation Notes

Generally speaking, it's required to:
 * Introduce new interface  MutipleReplicasReplicaRequest with Collection<String> groupsId() in addition to already existing ReplicaRequest with single String groupId();
 * Implement proper multiple replicas fun out and result aggrigation(including expcetion handling) within org.apache.ignite.network.NetworkMessageHandler#onReceived
 * Send such new TxCleanupReplicaRequests one per cluster node instead of one per replica, in other words rework org.apache.ignite.internal.tx.impl.TxManagerImpl#cleanup 

 


> Introduce mutipleReplica ReplicaRequests together with grouped TxCleanupReplicaRequest processing
> -------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-17582
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17582
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3
>
> h3. Motivation
> Within the scope of tx commit process, enlisted partitions are grouped together by primary replica cluster node, however during the tx finish processing brand new TxCleanupReplicaRequest is sent to each partition even colocated ones within same cluster node:
>  
> {code:java}
> public CompletableFuture<Void> cleanup(
>         ClusterNode recipientNode,
>         List<String> replicationGroupIds,
>         UUID txId,
>         boolean commit,
>         HybridTimestamp commitTimestamp
> ) {
>     // TODO: https://issues.apache.org/jira/browse/IGNITE-17582 Grouping replica requests.
>     replicationGroupIds.forEach(groupId -> {
>         try {
>             replicaService.invoke(
>                     recipientNode,
>                     FACTORY.txCleanupReplicaRequest()
>                             .groupId(groupId)
>                             .txId(txId)
>                             .commit(commit)
>                             .commitTimestamp(commitTimestamp)
>                             .build()
>             );
>         } catch (NodeStoppingException e) {
>             throw new TransactionException("Failed to perform tx cleanup, node is stopping.");
>         }
>     });
>     return null;
> } {code}
> Seems that we may introduce multipleReplicationGroups in addition to single ones that we already have in order to perform such collocated based requests.
> h3. Definition of Done
>  * General solution for groupping collocated replica requests is introduced.
>  * TxCleanupReplicaRequests are grouped on recipient node basis.
> h3. Implementation Notes
> Generally speaking, it's required to:
>  * Introduce new interface  MutipleReplicasReplicaRequest with Collection<String> groupsId() in addition to already existing ReplicaRequest with single String groupId();
>  * Implement proper multiple replicas fun out and aggregation(including expcetion handling) of the results within org.apache.ignite.network.NetworkMessageHandler#onReceived
>  * Send such new TxCleanupReplicaRequests one per cluster node instead of one per replica, in other words rework org.apache.ignite.internal.tx.impl.TxManagerImpl#cleanup 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)