You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Roman Puchkovskiy (Jira)" <ji...@apache.org> on 2024/02/20 11:42:00 UTC

[jira] [Comment Edited] (IGNITE-21116) After index backfill has started, ignore attempts to finish a tx started before the index had appeared

    [ https://issues.apache.org/jira/browse/IGNITE-21116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818768#comment-17818768 ] 

Roman Puchkovskiy edited comment on IGNITE-21116 at 2/20/24 11:41 AM:
----------------------------------------------------------------------

Further analysis showed that the race between write intent cleanup and the indexing of that write intent is not a problem. The index backfiller, when encountering a write intent, will invoke the standard Write Intent Resolution procedure that will either yield a committed version (which the backfiller will index), or yield an indication that the transaction has been aborted (and the backfiller will skip the write intent), or hang until the transaction gets resolved (this state can never be achieved if some partitions are offline, but the index will just hang in the BUILDING state which seems alright; if the building node gets rebooted, the backfill process will be recovered, it will hit the same write intent and hang once again).

This means that we don't need any special handling for such stale transaction finishes. The issue will be closed.


was (Author: rpuch):
Further analysis showed that the race between write intent cleanup and the indexing of that write intent is not a problem. The index backfiller, when encountering a write intent, will invoke the standard Write Intent Resolution procedure that will either yield a committed version (which the backfiller will index), or yield an indication that the transaction has been aborted (and the backfiller will skip the write intent), or hang until the transaction gets resolved (this state can never be achieved if some partitions are offline, but the index will just hang in the BUILDING state which seems alright; if the building node gets rebooted, the backfill process will be recovered, it will hit the same write intent and hang once again).

> After index backfill has started, ignore attempts to finish a tx started before the index had appeared
> ------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-21116
>                 URL: https://issues.apache.org/jira/browse/IGNITE-21116
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> Let's say a transaction tx1 had started before an index I1 has appeared. Then I1 switches to the BACKFILLING state, and only then the transaction tries to finish. This happens after IGNITE-21115 ensuring that all transactions started before I1 appearance by live coordinators have finished, so I1 belongs to a dead/unknown coordinator.
> We cannot just commit/abort it as it will cause a race between cleaning up the Write Intents of tx1 and the Backfiller already working on I1. So we should actually leave the transaction state unchanged and don't return any response, so we effectively turn the transaction into an ABANDONED one. Its state will be resolved by the Backfiller as soon as it hits first Write Intent of this transaction and performs Write Intent resolution.



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