[
https://issues.apache.org/jira/browse/IGNITE-17260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexander Lapin updated IGNITE-17260:
-------------------------------------
Release Note:
- readOnly() method is added to IgniteTransactoins. This one returns a
decorated {@code IgniteTransactions} instance that will start read-only
transactions.
- Following methods are added to Transaction interface
/**
* Returns {code true} if given transaction is a read-only, {@code false
otherwise}.
*
* @return {code true} if given transaction is a read-only, {@code false
otherwise}.
*/
boolean isReadOnly();
/**
* Returns read timestamp for the given transaction if it is a read-only
one or {code null} otherwise.
*
* @return Read timestamp for the given transaction if it is a read-only
one or {code null} otherwise.
*/
HybridTimestamp readTimestamp();
Generally speaking, added an ability to run read-only transactions using kv API.
> Enrich IgniteTransactions and Transaction interfaces with RO related methods
> ----------------------------------------------------------------------------
>
> Key: IGNITE-17260
> URL: https://issues.apache.org/jira/browse/IGNITE-17260
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexander Lapin
> Assignee: Alexander Lapin
> Priority: Major
> Labels: ignite-3, transaction3_ro
> Fix For: 3.0.0-beta1
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> It's required to explicitly register an intent of starting readOnly
> transaction, so following decorator producer is expected in IgniteTransactions
> {code:java}
> /**
> * Decorated {@code IgniteTransactions} instance that will start read-only
> transactions.
> *
> * @return Decorated {@code IgniteTransactions} instance that will start
> read-only transactions.
> */
> IgniteTransactions readOnly(); {code}
> Besides that Transaction interface should be extended with
> {code:java}
> boolean isReadOnly();{code}
> and
> {code:java}
> HybridTimestamp readTimestamp();{code}
> methods.
> And finally three more overloaded methods will be added to the InternalTable
> {code:java}
> CompletableFuture<BinaryRow> get(
> BinaryRowEx keyRow,
> @NotNull HybridTimestamp readTimestamp,
> @NotNull ClusterNode recipientNode
> );
>
> CompletableFuture<Collection<BinaryRow>> getAll(
> Collection<BinaryRowEx> keyRows,
> @NotNull HybridTimestamp readTimestamp,
> @NotNull ClusterNode recipientNode
> );
>
> Publisher<BinaryRow> scan(
> int p,
> @NotNull HybridTimestamp readTimestamp,
> @NotNull ClusterNode recipientNode
> );
> {code}
> Please, pay attention, that new parameter @NotNull ClusterNode recipientNode
> is added.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)