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

Fast switching thread for thin client batch operation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • Docs Required, Release Notes Required

    Description

      Motivation

      We have already done it for other table operations IGNITE-23616, but we could not do that for batch one.
      The reason why we excluded the batch operation is a performance penalty in the latency benchmark. Because if the thread is an early switch to a `partitons-operation` thread, we won't switch the thread further:

      // If the request actually came from the network, we are already in the correct thread that has permissions to do storage reads
      // and writes.
      // But if this is a local call (in the same Ignite instance), we might still be in a thread that does not have those permissions.
      if (shouldSwitchToRequestsExecutor(STORAGE_READ, STORAGE_WRITE, TX_STATE_STORAGE_ACCESS)) {
          requestsExecutor.execute(() -> handleReplicaRequest(request, sender, correlationId));
      } else {
          handleReplicaRequest(request, sender, correlationId);
      }
      

      As a result, the batch operation is executed in the single thread. But before we had a possibility to choose a dedicated thread for each partiton.

      InternalTableImpl#enlistInTx(Collection, InternalTransaction, IgnitePentaFunction, Function, BiPredicate, Long)
      

      Definition of done

      Implement fast thread switch for batch operations

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              v.pyatkov Vladislav Pyatkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: