[ 
https://issues.apache.org/jira/browse/IGNITE-20005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vyacheslav Koptilin updated IGNITE-20005:
-----------------------------------------
    Ignite Flags:   (was: Docs Required,Release Notes Required)

> Move commitTimestamp generation to the txn coordinator side.
> ------------------------------------------------------------
>
>                 Key: IGNITE-20005
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20005
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3, transaction, transaction3_recovery
>
> h3. Motivation
> Please check the context in 
> https://issues.apache.org/jira/browse/IGNITE-20033 and 
> https://issues.apache.org/jira/browse/IGNITE-20034
> After implemention writeIntentResolution coordinator path it'll be nessessary 
> to move commitTimestamp generation to the txn coordinator side.
> h3. Definition of Done
>  * Easy-breezy, calculate commitTimestamp as coordinator.now().
> h3. Implementation Notes
> Nothing to update on the "client" side, we already have everything we need.
> {code:java}
> public CompletableFuture<Void> finish() {
>     ...
>     HybridTimestamp commitTimestamp = commit ? clock.now() : null;
>     TxFinishReplicaRequest req = FACTORY.txFinishReplicaRequest()
>              ...
>             .commitTimestampLong(hybridTimestampToLong(commitTimestamp)) // 2
>    ...
> } {code}
> On the "server" side, we will adjust and simplify code in 
> org.apache.ignite.internal.table.distributed.replicator.PartitionReplicaListener#finishTransaction
> {code:java}
> private CompletableFuture<Object> finishTransaction(List<TablePartitionId> 
> aggregatedGroupIds, UUID txId, boolean commit) {
>     // TODO: IGNITE-17261 Timestamp from request is not using until the issue 
> has not been fixed (request.commitTimestamp())
>     var fut = new CompletableFuture<TxMeta>();
>     txTimestampUpdateMap.put(txId, fut);
>     HybridTimestamp currentTimestamp = hybridClock.now();
>     HybridTimestamp commitTimestamp = commit ? currentTimestamp : null; {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to