Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-22500

Remove unnecessary waits when creating an index

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

              ibessonov Ivan Bessonov
              rpuch Roman Puchkovskiy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: