ptupitsyn commented on code in PR #1766:
URL: https://github.com/apache/ignite-3/pull/1766#discussion_r1136758792


##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/tx/ClientTransactionCommitRequest.java:
##########
@@ -32,14 +33,20 @@ public class ClientTransactionCommitRequest {
      *
      * @param in        Unpacker.
      * @param resources Resources.
+     * @param metrics   Metrics.
      * @return Future.
      */
-    public static CompletableFuture<Void> process(ClientMessageUnpacker in, 
ClientResourceRegistry resources)
+    public static CompletableFuture<Void> process(
+            ClientMessageUnpacker in,
+            ClientResourceRegistry resources,
+            ClientHandlerMetricSource metrics)
             throws IgniteInternalCheckedException {
         long resourceId = in.unpackLong();
 
         Transaction t = resources.remove(resourceId).get(Transaction.class);
 
+        metrics.transactionsActiveDecrement();
+
         return t.commitAsync();

Review Comment:
   Fixed.



##########
modules/client-handler/src/main/java/org/apache/ignite/client/handler/requests/tx/ClientTransactionRollbackRequest.java:
##########
@@ -32,14 +33,20 @@ public class ClientTransactionRollbackRequest {
      *
      * @param in        Unpacker.
      * @param resources Resources.
+     * @param metrics   Metrics.
      * @return Future.
      */
-    public static CompletableFuture<Void> process(ClientMessageUnpacker in, 
ClientResourceRegistry resources)
+    public static CompletableFuture<Void> process(
+            ClientMessageUnpacker in,
+            ClientResourceRegistry resources,
+            ClientHandlerMetricSource metrics)
             throws IgniteInternalCheckedException {
         long resourceId = in.unpackLong();
 
         Transaction t = resources.remove(resourceId).get(Transaction.class);
 
+        metrics.transactionsActiveDecrement();
+
         return t.rollbackAsync();

Review Comment:
   Fixed.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to