denis-chudov commented on code in PR #5853: URL: https://github.com/apache/ignite-3/pull/5853#discussion_r2107203195
########## modules/client/src/main/java/org/apache/ignite/internal/client/compute/ClientJobExecution.java: ########## @@ -117,11 +118,10 @@ public ClusterNode node() { // especially in case of colocated execution. return ch.serviceAsync( ClientOp.COMPUTE_GET_STATE, - w -> w.out().packUuid(jobId), + (PayloadWriter) w -> w.out().packUuid(jobId), Review Comment: ```suggestion w -> w.out().packUuid(jobId), ``` ########## modules/client/src/main/java/org/apache/ignite/internal/client/compute/ClientJobExecution.java: ########## @@ -131,11 +131,10 @@ public ClusterNode node() { // especially in case of colocated execution. return ch.serviceAsync( ClientOp.COMPUTE_GET_STATE, - w -> w.out().packUuid(taskId), + (PayloadWriter) w -> w.out().packUuid(taskId), Review Comment: ```suggestion w -> w.out().packUuid(taskId), ``` ########## modules/client/src/main/java/org/apache/ignite/internal/client/compute/ClientJobExecution.java: ########## @@ -145,11 +144,10 @@ public ClusterNode node() { // especially in case of colocated execution. return ch.serviceAsync( ClientOp.COMPUTE_CANCEL, - w -> w.out().packUuid(jobId), + (PayloadWriter) w -> w.out().packUuid(jobId), Review Comment: ```suggestion w -> w.out().packUuid(jobId), ``` ########## modules/client/src/main/java/org/apache/ignite/internal/client/tx/ClientLazyTransaction.java: ########## @@ -135,41 +140,52 @@ public String nodeName() { * * @param tx Transaction. * @param ch Channel. - * @param sup Partition mapping supplier. - * @return Future that will be completed when the transaction is started. + * + * @return Future that will be completed when the transaction is started and first request flag. */ - public static CompletableFuture<ClientTransaction> ensureStarted( - @Nullable Transaction tx, - ReliableChannel ch, - @Nullable Supplier<PartitionMapping> sup + public static IgniteBiTuple<CompletableFuture<ClientTransaction>, Boolean> ensureStarted( + Transaction tx, + ReliableChannel ch ) { - if (tx == null) { - return nullCompletedFuture(); - } + return ensureStarted(tx, ch, () -> ch.getChannelAsync(null)); + } + /** + * Ensures that the underlying transaction is actually started on the server. + * + * @param tx Transaction. + * @param ch Channel. + * @param channelResolver Client channel resolver. Review Comment: Let's add the description when and why it can be null and how it's related to the return value, for the sake of code readability. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org