[
https://issues.apache.org/jira/browse/IGNITE-8405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16454626#comment-16454626
]
ASF GitHub Bot commented on IGNITE-8405:
----------------------------------------
GitHub user Jokser opened a pull request:
https://github.com/apache/ignite/pull/3929
IGNITE-8405 Update partition owners during exchange in 1 operation
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gridgain/apache-ignite ignite-8405
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3929.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3929
----
commit 158fa123464426a8188f60a6af0bfb04752a487d
Author: Pavel Kovalenko <jokserfn@...>
Date: 2018-04-26T17:55:57Z
IGNITE-8405 Update partition owners during exchange in 1 operation.
----
> Sql query may see intermediate results of topology changes and perform
> mapping incorrectly
> ------------------------------------------------------------------------------------------
>
> Key: IGNITE-8405
> URL: https://issues.apache.org/jira/browse/IGNITE-8405
> Project: Ignite
> Issue Type: Bug
> Components: cache, sql
> Affects Versions: 2.4
> Reporter: Pavel Kovalenko
> Assignee: Pavel Kovalenko
> Priority: Major
>
> 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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)