[ https://issues.apache.org/jira/browse/IGNITE-24218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pereslegin updated IGNITE-24218: -------------------------------------- Description: Direct flow applicable transaction (or *direct* transaction) is an implicit read-only transaction. Methods {{readTimestamp()}}/{{startTimestamp()}} of such transactions should not be used, but at the moment there is confusion in the code and sometimes these methods are used. To make the behavior of these transactions clearer, it is recommended to do the following: * Add method {{boolean direct()}} to {{InternalTransaction}} * Throw an exception when calling {{readTimestamp()}}/{{startTimestamp()}} methods for a direct transaction. * Replace usages of {{isDirectFlowApplicableTx}} to {{direct()}} or update {{isDirectFlowApplicableTx}} method to use {{direct()}} p.s. check the corresponding TODO in the codebase. was: Direct flow applicable transaction (or *direct* transaction) is an implicit read-only transaction. Methods {{readTimestamp()}}/{{startTimestamp()}} of such transactions should not be used, but at the moment there is confusion in the code and sometimes these methods are used. To make the behavior of these transactions clearer, it is recommended to do the following: * Add method {{boolean direct()}} to {{InternalTransaction}} * Replace usages of {{isDirectFlowApplicableTx}} to {{direct()}} or update {{isDirectFlowApplicableTx}} method to use {{direct()}} * Throw an exception when calling {{readTimestamp()}}/{{startTimestamp()}} methods for a direct transaction. p.s. check the corresponding TODO in the codebase. > Add a method to clearly distinguish direct transactions > ------------------------------------------------------- > > Key: IGNITE-24218 > URL: https://issues.apache.org/jira/browse/IGNITE-24218 > Project: Ignite > Issue Type: Improvement > Reporter: Pavel Pereslegin > Priority: Major > Labels: ignite-3 > > Direct flow applicable transaction (or *direct* transaction) is an implicit > read-only transaction. > Methods {{readTimestamp()}}/{{startTimestamp()}} of such transactions should > not be used, but at the moment there is confusion in the code and sometimes > these methods are used. > To make the behavior of these transactions clearer, it is recommended to do > the following: > * Add method {{boolean direct()}} to {{InternalTransaction}} > * Throw an exception when calling {{readTimestamp()}}/{{startTimestamp()}} > methods for a direct transaction. > * Replace usages of {{isDirectFlowApplicableTx}} to {{direct()}} or update > {{isDirectFlowApplicableTx}} method to use {{direct()}} > p.s. check the corresponding TODO in the codebase. -- This message was sent by Atlassian Jira (v8.20.10#820010)