ascherbakoff commented on code in PR #5853:
URL: https://github.com/apache/ignite-3/pull/5853#discussion_r2103918929


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/tx/ClientTransactionBeginRequest.java:
##########
@@ -113,11 +76,6 @@ public class ClientTransactionBeginRequest {
             long resourceId = resources.put(new ClientResource(tx, 
tx::rollbackAsync));
             out.packLong(resourceId);
 
-            if (enableDirectMapping && !readOnly) {

Review Comment:
   I've added the commit [1] which ensures this code path will only be called 
in proxy (old) mode.
   So it's safe to remove all code related to direct mapping from here.
   [1] 
https://github.com/apache/ignite-3/pull/5853/commits/02fa047ff55e8a7d97f52bbc2653eb3a8af74328



##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/table/ClientTableCommon.java:
##########
@@ -392,7 +393,13 @@ public static CompletableFuture<TableViewInternal> 
readTableAsync(ClientMessageU
      * @param tx The transaction.
      */
     public static void writeTxMeta(ClientMessagePacker out, @Nullable 
ClockService clockService, InternalTransaction tx) {
-        if (tx.remote()) {
+        if (out.resourceId() != 0) {
+            // Resource id is assigned on a first request in direct mode.
+            out.packLong(out.resourceId());

Review Comment:
   It's safe here. This code path can only be executed by compatible client.



-- 
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

Reply via email to