[ 
https://issues.apache.org/jira/browse/IGNITE-20868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roman Puchkovskiy resolved IGNITE-20868.
----------------------------------------
    Fix Version/s: 3.0.0-beta2
       Resolution: Fixed

Fixed in IGNITE-17824: now, for the embedded mode where the call does not 
actually goes to the network, no thread switch happens.

> ReplicaService whenCompleteAsync waste significant amount of time
> -----------------------------------------------------------------
>
>                 Key: IGNITE-20868
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20868
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Kirill Gusakov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> During the YCSB 1-node embedded run we found out the following behaviour: 
> [this code 
> |https://github.com/apache/ignite-3/blob/82c74598b5006ea3e4e86da744a68022dd799c89/modules/replicator/src/main/java/org/apache/ignite/internal/replicator/ReplicaService.java#L92]
>  takes significant time to execute, because of whenCompleteAsync:
> {code:java}
>  private <R> CompletableFuture<R> sendToReplica(String 
> targetNodeConsistentId, ReplicaRequest req) {
>         CompletableFuture<R> res = new CompletableFuture<>();
>         // TODO: IGNITE-17824 Use named executor instead of default one in 
> order to process replica Response.
>         messagingService.invoke(targetNodeConsistentId, req, 
> RPC_TIMEOUT).whenCompleteAsync(
> {code}
> The simple switch to simple whenComplete give us a boost from 26us/s to 
> 13us/s in the 1-node fsync=false run of SelectBenchmark.kvGet



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

Reply via email to