Vladislav Pyatkov created IGNITE-23641:
------------------------------------------

             Summary: Fast switching thread for think client batch operation
                 Key: IGNITE-23641
                 URL: https://issues.apache.org/jira/browse/IGNITE-23641
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vladislav Pyatkov


h3. 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:
{code}
// 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);
}
{code}
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.
{noformat}
InternalTableImpl#enlistInTx(Collection, InternalTransaction, 
IgnitePentaFunction, Function, BiPredicate, Long)
{noformat}

h3. Definition of done
Implement fast thread switch for batch operations



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to