xtern commented on code in PR #4690:
URL: https://github.com/apache/ignite-3/pull/4690#discussion_r1841685512


##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TxManagerImpl.java:
##########
@@ -961,11 +978,35 @@ private HybridTimestamp 
createBeginTimestampWithIncrementRwTxCounter() {
         });
     }
 
+    /** Called when a read-write transaction is finished. */
+    private void onFinishRwTx(UUID txId) {
+        decrementRwTxCount(txId);
+
+        unregister(txId);
+    }
+
     private void decrementRwTxCount(UUID txId) {
         localRwTxCounter.inUpdateRwTxCountLock(() -> {
             localRwTxCounter.decrementRwTxCount(beginTimestamp(txId));
 
             return null;
         });
     }
+
+    /**
+     * Puts a transaction into the registry.
+     *
+     * @param tx Transaction.
+     * @return Registered transaction.
+     */
+    private InternalTransaction register(InternalTransaction tx) {
+        transactions.put(tx.id(), tx);

Review Comment:
   The PR was reworked so that the system view now uses existing collections. 
Review it again, please.



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