alex-plekhanov commented on a change in pull request #7616: IGNITE-12853: 
Introduced features for the thin client protocol
URL: https://github.com/apache/ignite/pull/7616#discussion_r409864535
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/client/thin/TcpClientTransactions.java
 ##########
 @@ -88,13 +88,15 @@ private ClientTransaction txStart0(TransactionConcurrency 
concurrency, Transacti
         TcpClientTransaction tx0 = tx();
 
         if (tx0 != null)
-            throw new ClientException("A transaction has already started by 
the current thread.");
+            throw new ClientException("A transaction has already been started 
by the current thread.");
 
         tx0 = ch.service(ClientOperation.TX_START,
             req -> {
-                if (req.clientChannel().serverVersion().compareTo(V1_5_0) < 0) 
{
-                    throw new ClientProtocolError(String.format("Transactions 
have not supported by the server's " +
-                        "protocol version %s, required version %s", 
req.clientChannel().serverVersion(), V1_5_0));
+                ProtocolContext protocolCtx = 
req.clientChannel().protocolCtx();
+
+                if 
(!protocolCtx.isFeatureSupported(ProtocolVersionFeature.TRANSACTIONS)) {
+                    throw new ClientProtocolError(String.format("Transactions 
are not supported by the server's " +
+                        "protocol version %s, required version %s", 
protocolCtx.version(), V1_5_0));
 
 Review comment:
   `V1_5_0` -> `ProtocolVersionFeature.TRANSACTIONS.verIntroduced()`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to