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

Evgeny Stanilovsky updated IGNITE-19344:
----------------------------------------
    Fix Version/s: 3.2
                       (was: 3.1)

> Generate unique txId suffix per node
> ------------------------------------
>
>                 Key: IGNITE-19344
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19344
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>
> We need txId (transaction ID)  to have the following properties:
>  # Contain beginTs inside it so that we can extract beginTs from txId
>  # txId must be globally unique
>  # Its length must be 128 bits (to fit in UUID) - this requirement comes from 
> the current implementation and it's not clear why exactly we need it
> Current approach is to construct txId as a concatenation of txId prefix (aka 
> nodeId) and beginTs taken as HLC.now() on the node that generates the txId. 
> txId prefix must be unique among all coordinators. If we make it unique among 
> all nodes in the logical topology, this solves our problem.
> We need to design and implement a way to choose a unique txId prefix. We 
> probably need to validate this value on join to make sure it's unique. On the 
> generation, here are some ideas:
>  # Use MAC address to generate the prefix (but MAC addresses are not unique; 
> we not always have access to MAC address; more than one Ignite nodes might be 
> started on the same machine; we need to hash the MAC to fit in 32 bits, so 
> collisions may happen even with different MACs)
>  # Use hash code from consistentId (this could lead to a necessity to change 
> it by the user if a collision happens)
>  # Generate txId prefix using a cluster-global cyclic 32 bit counter on join 
> (the downside is that it looks like an additional ID [additional to 
> consistentId])
>  # Use the approach from the previous item to replace consistentId (and so 
> remove consistentId from the system completely)



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

Reply via email to