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

Sql query may see intermediate results of topology changes and perform mapping incorrectly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Component/s: cache, sql
    • Labels:
      None

      Description

      Affected test: IgniteStableBaselineCacheQueryNodeRestartsSelfTest

      Sql query do mapping in following way:
      1) If there is at least 1 moving partition query will be mapped to current partition owners
      2) In other case affinity mapping will be used.

      In case of first approach query may see not final partition state if mapping happens during PME. There is "setOwners()" method which does partition movement one-by-one, each time obtaining topology write lock. If query mapping happens in this time it may see that there is some moving partition and performed mapping to OWNING partition which will be moved to MOVING on next "setOwners()" invocation.

      As result we may query from invalid partitions.

      As intermediate solution "setOwners()" method should be refactored in a batch way to perform ALL partitions state changes to MOVING in one operation.

      As general solution query mapping should be revisited, especially "isPreloadingActive" method, to take into account given topology version.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Jokser Pavel Kovalenko
                Reporter:
                Jokser Pavel Kovalenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: