denis-chudov commented on code in PR #7323:
URL: https://github.com/apache/ignite-3/pull/7323#discussion_r2650868937


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/systemviews/ItTransactionsSystemViewTest.java:
##########
@@ -60,6 +60,7 @@ public void testMetadata() {
                         new 
MetadataMatcher().name("TRANSACTION_START_TIME").type(ColumnType.TIMESTAMP).nullable(true),
                         new 
MetadataMatcher().name("TRANSACTION_TYPE").type(ColumnType.STRING).nullable(true),
                         new 
MetadataMatcher().name("TRANSACTION_PRIORITY").type(ColumnType.STRING).nullable(true),
+                        new 
MetadataMatcher().name("TRANSACTION_LABEL").type(ColumnType.STRING).nullable(true),

Review Comment:
   Let's also add a test here to check `TRANSACTION_LABEL` content. You can set 
it by modifying transaction state using test-only `IgniteImpl#txManager`.
   You can also add todo with link to 
https://issues.apache.org/jira/browse/IGNITE-27005 to change test-only method 
to regular API usage.



##########
modules/transactions/src/main/java/org/apache/ignite/internal/tx/views/TransactionsViewProvider.java:
##########
@@ -77,6 +77,10 @@ public SystemView<?> get() {
                 .<Instant>addColumn("TRANSACTION_START_TIME", timestampType, 
tx -> tx.startTime)
                 .<String>addColumn("TRANSACTION_TYPE", stringType, tx -> 
tx.type)
                 .<String>addColumn("TRANSACTION_PRIORITY", stringType, tx -> 
tx.priority)
+                .<String>addColumn("TRANSACTION_LABEL", stringType, tx -> {
+                    TxStateMeta meta = 
dataSource.txStates.get(UUID.fromString(tx.id));

Review Comment:
   I see that `tx.id` is initialized ilke this:
   ```
   TxInfo(UUID txId, TxState txState, String type) {
       this.id = txId.toString();
   ```
   Until now, it wasn't intended to be used as uuid, but now we need proper 
type. Let's change `tx.id` to uuid



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