[
https://issues.apache.org/jira/browse/IGNITE-17537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17584673#comment-17584673
]
Julia Bakulina commented on IGNITE-17537:
-----------------------------------------
1) ", duration=" + getDuration() {*}/ 1000{*};
", timeout=" + getTimeout();
VisorTxInfo class:
[https://github.com/apache/ignite/blob/bf9a460eccd07701cacac2a414c65707243350f1/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxInfo.java#L286]
2) long duration from getDuration() is in milliseconds as per VisorTxTask class
(long duration = U.currentTimeMillis() - locTx.startTime()):
[https://github.com/apache/ignite/blob/f6e2ebe8e62b3e442bda2a70f19544261b3c0cfa/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxTask.java#L243]
3) long timeout is in milliseconds as per IgniteInternalTx interface ("Gets
timeout value in milliseconds for this transaction"):
[https://github.com/apache/ignite/blob/e2008f4652544e51c75a8586ef8aee82fb2923b9/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java#L148]
>From the above 1) -3) after dividing into 1000 the duration is in seconds
>while timeout is still in milliseconds which should be explicitly highlighted.
> Make units of 'timeout' and 'duration' more explicit in control.sh --tx output
> ------------------------------------------------------------------------------
>
> Key: IGNITE-17537
> URL: https://issues.apache.org/jira/browse/IGNITE-17537
> Project: Ignite
> Issue Type: Improvement
> Components: control.sh
> Affects Versions: 2.13
> Reporter: Ilya Shishkov
> Assignee: Julia Bakulina
> Priority: Trivial
> Labels: ise, newbie
>
> Execution of {{control.sh --tx}} command produces output of matching
> transactions, eg.:
> {quote}Matching transactions:
> Tx: [xid=fdc4d720281-00000000-0fd8-0177-0000-000000000012, label=null,
> state=ACTIVE, startTime=2022-07-06 05:05:07.432,
> {*}{color:#ff0000}duration=778{color}{*}, isolation=REPEATABLE_READ,
> concurrency=PESSIMISTIC, topVer=AffinityTopologyVersion [topVer=199,
> minorTopVer=0], {*}{color:#ff0000}timeout=40000{color}{*}, ...]
> {quote}
> But, from the above line it is unclear, that in fact, duration is printed in
> seconds [1], while timeout is printed in milliseconds.
> We can improve output in one of the following ways:
> # Explicitly append unit for seconds and milliseconds.
> # Print duration and timeout in same units: both in seconds or both in
> milliseconds.
> Links:
> #
> https://github.com/apache/ignite/blob/bf9a460eccd07701cacac2a414c65707243350f1/modules/core/src/main/java/org/apache/ignite/internal/visor/tx/VisorTxInfo.java#L286
--
This message was sent by Atlassian Jira
(v8.20.10#820010)