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

Clean up write intents for RW transaction on primary

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0
    • None

    Description

      If a transaction was committed/aborted, but for any reason the cleanup operation was not performed on a node, the write intent entries would still be present in the storage.
      For example, the primary node crashed before executing the cleanup. In this case the storage will still have write intents even if the transaction is finished.

      When an RO transaction sees write intents, no matter on primary or on any other node, it performs write intent resolution and returns the correct result.

      When an RW transaction sees write intents (happens on primary only), it also performs write intent resolution. But any following change of the rows having write intents will result in a storage exception because the storage doesn't support more than one write intent per row.

      IGNITE-20041 added a way to trigger async write intent cleanup on the node that executes write intent resolution. But RW transaction does not wait the completion of the cleanup.

      Definition of done:
      If an RW transaction performs write intent resolution for a row and this is a modifying action (not GET), we should synchronously cleanup the write intent before proceeding with executing UpdateCommand.

      Implementation details

      We can either call cleanup directly (like in processTxCleanupAction or wait for the cleanup future (the result of async cleanup execution method) to finish.

      Attachments

        Issue Links

          Activity

            People

              ksizov  Kirill Sizov
              ksizov  Kirill Sizov
              Alexander Lapin Alexander Lapin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h
                  3h