[ https://issues.apache.org/jira/browse/IGNITE-21115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kirill Tkalenko reassigned IGNITE-21115: ---------------------------------------- Assignee: Kirill Tkalenko > Wait for completion of transactions started before index appearance > ------------------------------------------------------------------- > > Key: IGNITE-21115 > URL: https://issues.apache.org/jira/browse/IGNITE-21115 > Project: Ignite > Issue Type: Improvement > Reporter: Roman Puchkovskiy > Assignee: Kirill Tkalenko > Priority: Major > Labels: ignite-3 > Fix For: 3.0.0-beta2 > > > When an index is created (and appears in the REGISTERED state), we must wait > for all transactions started on schemas before the index has appeared to > finish. > Primary replica of the partition zero of the table owning the created index > is responsible for the wait. > # When a node sees appearance of a REGISTERED index state in the Catalog, > and it’s a primary of partition zero of the table owning the index, it starts > the waiter > # When a node becomes the primary of the partition zero of a table, and the > table contains indices that are in the REGISTERED state (at the moment of the > primary lease start), it starts a waiter per each such index > # When a node ceases to be the primary of the partition zero of a table, it > stops all the waiters it started > # When the waiter finishes its waiting and the node is still a primary, it > switches the index to the BACKFILLING state > h5. Waiter operation > # Wait for HLC.now() to become greater than ActivationMoment(index > REGISTERED state) + MaxClockSkew (to make sure that the REGISTERED state > activates on each node in the cluster) > # Take all nodes in the cluster Logical Topology (LT) from the CMG Leader > (not from the local state delivered by CMG learners) and put it in the > *Nodes* list. ({*}Nodes{*} contains all the nodes that might have started RW > transactions on schemas before the index appeared; other nodes had either > left the topology, or they can only coordinate RW transactions started on > schema versions containing the index) > Poll each node in the *Nodes* list until either its RwTransactionsFinished(V) > (see IGNITE-21112) returns true (where V is the catalog version where the > index had appeared) or the node leaves the LT (if the node leaves the > Physical Topology, we proceed waiting till it falls off the LT). > After the waiter finishes, we must switch the index to the BACKFILLING state. -- This message was sent by Atlassian Jira (v8.20.10#820010)