You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2023/05/02 14:35:00 UTC

[jira] [Updated] (IGNITE-19344) Generate unique txId suffix per node

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

Roman Puchkovskiy updated IGNITE-19344:
---------------------------------------
    Summary: Generate unique txId suffix per node  (was: Generate unique txId prefix per node)

> 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.0.0-beta2
>
>
> 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)