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

Avoid partition-operations pool when it not lead to starvation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • Docs Required, Release Notes Required

    Description

      Motivation

      Chnaging pools and related parking/unparking lead to an increase in latency. Sometimes we can avoid extra pool changing, for example, by doing it for embedded operations.

      ReplicaManager#onReplicaMessageReceived
      ExecutorService stripeExecutor = ReplicationGroupStripes.stripeFor(request.groupId(), requestsExecutor);
      stripeExecutor.execute(() -> handleReplicaRequest(request, senderConsistentId, correlationId));
      

      This code changes a thread, even if it is not necessary.

      Definition of done

      ReplicaManager should not switch threads if it does not lead to starvation (in my opinion, the splitting is needed only in the case of the network thread).

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: