[ 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 due to additional network hops. This can be optimized by partially enabling enlisting part of txn processing on a 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 creates a transaction collocated to commit partition for write intent resolution purposes. # If a request is executed without known partition, it's routed to the server tx coordinator. # If SQL is executed with a txn, it's routed to server tx coorinator. # Collect enlistement token from each partition on first request to a partition. # Track HLC from enlisted partitions on each request # Track ordering token within a txn by calculating max(all_trackerd_HLCs) # Send commit request containing local enlistment map and ordering token. Note that server tx coordinator is collocated with commit partition. # On commit use both server and client enlistment information to calculate commit ts and validate leases. # Directly mapped entries associated with a timeout, on expiration write intent resolution is performed. First 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 due to additional network hops. This can be optimized by partially enabling enlisting part of txn processing on a 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 creates a transaction collocated to commit partition for write intent resolution purposes. # If a request is executed without known partition, it's routed to the server tx coordinator. # If SQL is executed with a txn, it's routed to server tx coorinator. # Collect enlistement token from each partition on first request to a partition. # Track HLC from enlisted partitions on each request # Track ordering token within a txn by calculating max(all_trackerd_HLCs) # Send commit request containing local enlistment map and ordering token. Note that server tx coordinator is collocated with commit partition. # On commit use both server and client enlistment information to calculate commit ts and validate leases. # Directly mapped entries associated with a timeout, on expiration write intent resolution is performed. 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 due to > additional network hops. > This can be optimized by partially enabling enlisting part of txn processing > on a 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 creates a transaction collocated to commit partition for write > intent resolution purposes. > # If a request is executed without known partition, it's routed to the > server tx coordinator. > # If SQL is executed with a txn, it's routed to server tx coorinator. > # Collect enlistement token from each partition on first request to a > partition. > # Track HLC from enlisted partitions on each request > # Track ordering token within a txn by calculating max(all_trackerd_HLCs) > # Send commit request containing local enlistment map and ordering token. > Note that server tx coordinator is collocated with commit partition. > # On commit use both server and client enlistment information to calculate > commit ts and validate leases. > # Directly mapped entries associated with a timeout, on expiration write > intent resolution is performed. > First 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)