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

Alexey Scherbakov updated IGNITE-24561:
---------------------------------------
    Description: 
Currently client transactions are always routed via tx coordinator node, which 
introduces huge latency for cross partition transactions.

This can be optimized by moving enlisting part of txn processing to client. The 
necessary changes to be done are:
 # Enable direct mapping protocol if a partition map is loaded and valid on a 
client, otherwise go old way via coordinator proxy.
 # tx.begin still creates an empty transaction for write intent resolution 
purposes.
 # Empty transaction is associated with a timeout. Then a timeout expires, tx 
is rolled back via commit partition.
 # Collect enlistement token from each partition on first request to a 
partition.
 # Track HLC from partitions on each request
 # Assign commit ts = max(all_trackerd_HLCs) + 1
 # Send commit request directly to commit partition.
 # Validate lease on commit in the same way as for one phase transactions.
 # Delayed ack optimization is disabled for simplicity (may be implemented 
later)

Firstly this optimization should be implemented for java client only.

Experiments show 35% performance gain using direct mapping approach.

  was:
Currently client transactions are always routed via tx coordinator node, which 
introduces huge latency for cross partition transactions.

This can be optimized by moving enlisting part of txn processing to client. The 
necessary changes to be done are:
 # Enable direct mapping protocol if a partition map is loaded and valid on a 
client, otherwise go old way via coordinator proxy.
 # tx.begin still creates an empty transaction for write intent resolution 
purposes.
 # Empty transaction is associated with a timeout. Then a timeout expires, tx 
is rolled back via commit partition.
 # Collect enlistement token from each partition on first request to a 
partition.
 # Track HLC from partitions on each request
 # Assign commit ts = max(all_trackerd_HLCs) + 1
 # Send commit request directly to commit partition.
 # Validate lease on commit in the same way as for one phase transactions.

Firstly this optimization should be implemented for java client only.

Experiments show 35% performance gain using direct mapping approach.


> Implement lightweight client tx coordination
> --------------------------------------------
>
>                 Key: IGNITE-24561
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24561
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexey Scherbakov
>            Assignee: Alexey Scherbakov
>            Priority: Major
>              Labels: ignite-3
>
> Currently client transactions are always routed via tx coordinator node, 
> which introduces huge latency for cross partition transactions.
> This can be optimized by moving enlisting part of txn processing to client. 
> The necessary changes to be done are:
>  # Enable direct mapping protocol if a partition map is loaded and valid on a 
> client, otherwise go old way via coordinator proxy.
>  # tx.begin still creates an empty transaction for write intent resolution 
> purposes.
>  # Empty transaction is associated with a timeout. Then a timeout expires, tx 
> is rolled back via commit partition.
>  # Collect enlistement token from each partition on first request to a 
> partition.
>  # Track HLC from partitions on each request
>  # Assign commit ts = max(all_trackerd_HLCs) + 1
>  # Send commit request directly to commit partition.
>  # Validate lease on commit in the same way as for one phase transactions.
>  # Delayed ack optimization is disabled for simplicity (may be implemented 
> later)
> Firstly this optimization should be implemented for java client only.
> Experiments show 35% performance gain using direct mapping approach.



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

Reply via email to