[
https://issues.apache.org/jira/browse/IGNITE-22500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17859937#comment-17859937
]
Ivan Bessonov commented on IGNITE-22500:
----------------------------------------
My thoughts on the topic:
* _We have additional switch from REGISTERED to BUILDING, which can in theory
be eliminated from catalog, it'll save us additional second (DD is 500ms now)_
* We can't lower DD for a specific status change, because it would violate
schema synchronization protocol. After waiting for "msSafeTime - DD - skew"
(don't remember precise rules about clock skew) we rely on the fact that the
catalog is up-to-date, breaking that invariant would lead to some unforeseen
consequences.
* What we really need it:
** The ability to create indexes in the same DDL as the table itself. We do
this implicitly for PK. For other indexes it's only a question of API
** For SQL scripts we could batch consecutive DDLs and create indexes at the
same time as a table implicitly, which seems like an optimal choice. This way
we don't need any special syntax
** Some DDL queries can be executed in parallel, why not. Again, seems more
like a SQL issue to me
> 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)