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

Client should participate in RW TX clock adjustment

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-beta1
    • 3.1
    • thin client

    Description

      Motivation

      RW TX protocol requires commit timestamp to be greater than all other timestamps associated with previous TX actions of the same transaction. For more details, please check [IEP-91:Hybridlogicaltime|#IEP91:Transactionprotocol-Hybridlogicaltime].]. Thus, any TX request/response up to the commit timestamp generation transfers a hybrid timestamp from one TX actor to another, where another actor adjust its HLC as 

      max(requestTime.longValue() + 1, max(now, oldLatestTime + 1));

      See 

      org.apache.ignite.internal.replicator.message.TimestampAware

      and 

      org.apache.ignite.internal.hlc.HybridClockImpl#update

      for more details.

      Given logic was already implemented for server-side communication and thus should only be expanded to the client side, so that clients can route TX requests themselves for the best-effort affinity purposes. It is worth to mention that client won't have HLC instance itself, because it's not possible to cover clients with clock skew management, thus it will only store timestamp received from the server and send it back with RW/RO requests. Client-server protocol adjustments (adding hybridTimestamp field to both requests and response together storing logic) will be implemented in https://issues.apache.org/jira/browse/IGNITE-19884 along with propagating commitTimestmap and RO.readTimestamp to the client, meaning that withing current ticket it'll be necessary:

      • To expand list of such server-to-client TX-related timestamp producers, in a way that all RW TX responses, that were triggered from client, will propagate corresponding response timestamps to a client.
      • Timestamp retrieved from the client wihtin the scope of RW TX flow will adjust server HLC.

      Definition of Done

      • The HLC adjustment on the server actors of the RW TX protocol is also available in cases of their communication transitively through the client.

      Attachments

        Activity

          People

            ptupitsyn Pavel Tupitsyn
            alapin Alexander Lapin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: