Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-19344

Generate unique txId suffix per node

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 3.0
    • None

    Description

      We need txId (transaction ID)  to have the following properties:

      1. Contain beginTs inside it so that we can extract beginTs from txId
      2. txId must be globally unique
      3. 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:

      1. 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)
      2. Use hash code from consistentId (this could lead to a necessity to change it by the user if a collision happens)
      3. 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])
      4. Use the approach from the previous item to replace consistentId (and so remove consistentId from the system completely)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rpuch Roman Puchkovskiy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: