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

Explicit writeIntent cleanup on primary replica

    XMLWordPrintableJSON

Details

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

    Description

      Motivation

      Currently, locks are released on primary when cleanup is replicated over majority

      private CompletableFuture<Void> processTxCleanupAction(TxCleanupReplicaRequest request) {
          ...
              return raftClient
                      .run(txCleanupCmd)
                      .thenCompose(ignored -> allOffFuturesExceptionIgnored(txReadFutures, request)
                              .thenRun(() -> releaseTxLocks(request.txId())));
          ...
      } 

      That is actually incorrect, because it's possible that primary won't be a part of a majority, meaning that we will release lock still having writeIntent locally. Generally speaking that should be resolved by implementing writeIntent resolution for RW transactions. However given ticket is not yet implemented. Anyway, it is worth to clean up writeIntents on primary replica explicitly for a sense of performance in order to eliminate excessive writeIntent resolutions.

      Definition of Done

      • Explicit writeIntent cleanup on primary replica prior to locks release is implemented.

       

      Attachments

        Issue Links

          Activity

            People

              alapin Alexander Lapin
              alapin 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 - 20m
                  20m