[
https://issues.apache.org/jira/browse/IGNITE-22500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Bessonov resolved IGNITE-22500.
------------------------------------
Resolution: Won't Fix
About eliminating a BUILDING status from catalog, we can't simply change a few
lines, this task involves more changes. To my understanding, following nuances
are important:
* ChangeIndexStatusTask should be changed. If we remove REGISTERED->BUILDING
change, then we wouldn't have to update catalog, this will lead to small
refactoring.
* We would have to create {{CatalogEvent.INDEX_BUILDING}} event instead of
updating the catalog.
* This event will have nothing to do with catalog at this point, it should be
renamed.
* It will *not* be fired in a context of meta-storage watch execution, which
might be a problem if listener implementations rely on it. Spoiler: they do.
* Local recovery and other such stuff will be changed slightly, this part
shouldn't be that hard.
Overall, I don't think that we should do such an optimization in this issue
specifically. It's not about "removing wait that we don't need", it's about
changing the internal protocol of index creation. I will file another Jira for
that soon
> Remove unnecessary waits when creating an index
> -----------------------------------------------
>
> Key: IGNITE-22500
> URL: https://issues.apache.org/jira/browse/IGNITE-22500
> Project: Ignite
> Issue Type: Improvement
> Reporter: Roman Puchkovskiy
> Assignee: Ivan Bessonov
> Priority: Major
> Labels: ignite-3
>
> When creating an index with current defaults (DelayDuration=1sec,
> MaxClockSkew=500ms, IdleSafeTimePropagationPeriod=1sec), it takes 6-6.5
> seconds on my machine (without concurrent transactions, on an empty table
> that was just created).
> According to the design, we need to first wait for the REGISTERED state to
> activate on all nodes, including the ones that are currently down; this is to
> make sure that all transactions started on schema versions before the index
> creation have finished before we start to build the index (this makes us
> waiting for DelayDuration+MaxClockSkew). Then, after the build finishes, we
> switch the index to the AVAILABLE state. This requires another wait of
> DelayDuration+MaxClockSkew.
> Because of IGNITE-20378, in the second case we actually wait longer (for
> additional IdleSafeTimePropagationPeriod+MaxClockSkew).
> The total of waits is thus 1.5+3=4.5sec. But index creation actually takes
> 6-6.5 seconds. It looks like there are some additional delays (like
> submitting to the Metastorage and executing its watches).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)