[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-01-16 Thread Sergey Kosarev (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Kosarev updated IGNITE-12549:

Description: 
Case 1
1.  start server node 1
2  create and fill replicated cache with RebalanceMode.Async (as by default)
3  start servr node 2 
3 immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the node 2
It can get empty or partial results. (if rebalance on node 2 is finished)

Case 2
1.  start server node 1
2  create and fill replicated cache with RebalanceMode.Async (as by default)
3 start client node 2
3  start server node 3 
3 immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the client node 2
It can get empty or partial results. (if rebalance on node 2 is not finished 
and query is mapped on the node 2)

It looks like problem in the 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()

case REPLICATED:
if (prj != null || part != null)
return nodes(cctx, prj, part);

if (cctx.affinityNode())
return *Collections.singletonList(cctx.localNode())*;

Collection affNodes = nodes(cctx, null, null);

return affNodes.isEmpty() ? affNodes : 
*Collections.singletonList(F.rand(affNodes))*;

case PARTITIONED:
return nodes(cctx, prj, part);

 which is executed in 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery

if executed on a just started node it obviously returns the local node 
disregarding was it rebalanced or not.

if executed on a client it returns a random affinity node, so it also can be 
not yet rebalanced node.






  was:
Case 1
1.  start server node 1
2  create and fill replicated cache with RebalanceMode.Async (as by default)
3  start servr node 2 
3 immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the node 2
It can get empty or partial results. (if rebalance on node 2 is finished)

Case 2
1.  start server node 1
2  create and fill replicated cache with RebalanceMode.Async (as by default)
3 start client node 2
3  start server node 3 
3 immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the client node 2
It can get empty or partial results. (if rebalance on node 2 is not finished 
and query is mapped on the node 2)

It looks like problem in the 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()

case REPLICATED:
if (prj != null || part != null)
return nodes(cctx, prj, part);

if (cctx.affinityNode())
return *Collections.singletonList(cctx.localNode())*;

Collection affNodes = nodes(cctx, null, null);

return affNodes.isEmpty() ? affNodes : 
*Collections.singletonList(F.rand(affNodes))*;

case PARTITIONED:
return nodes(cctx, prj, part);

 




> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Priority: Major
>
> Case 1
> 1.  start server node 1
> 2  create and fill replicated cache with RebalanceMode.Async (as by default)
> 3  start servr node 2 
> 3 immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1.  start server node 1
> 2  create and fill replicated cache with RebalanceMode.Async (as by default)
> 3 start client node 2
> 3  start server node 3 
> 3 immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQue

[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-01-16 Thread Sergey Kosarev (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Kosarev updated IGNITE-12549:

Description: 
Case 1
1.  start server node 1
2.  create and fill replicated cache with RebalanceMode.Async (as by default)
3.  start servr node 2 
4. immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the node 2
It can get empty or partial results. (if rebalance on node 2 is finished)

Case 2
1. start server node 1
2. create and fill replicated cache with RebalanceMode.Async (as by default)
3. start client node 2
4. start server node 3 
5. immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the client node 2
It can get empty or partial results. (if rebalance on node 2 is not finished 
and query is mapped on the node 2)

It looks like problem in the 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()

case REPLICATED:
if (prj != null || part != null)
return nodes(cctx, prj, part);

if (cctx.affinityNode())
return *Collections.singletonList(cctx.localNode())*;

Collection affNodes = nodes(cctx, null, null);

return affNodes.isEmpty() ? affNodes : 
*Collections.singletonList(F.rand(affNodes))*;

case PARTITIONED:
return nodes(cctx, prj, part);

 which is executed in 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery

if executed on a just started node it obviously returns the local node 
disregarding was it rebalanced or not.

if executed on a client it returns a random affinity node, so it also can be 
not yet rebalanced node.






  was:
Case 1
1.  start server node 1
2  create and fill replicated cache with RebalanceMode.Async (as by default)
3  start servr node 2 
3 immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the node 2
It can get empty or partial results. (if rebalance on node 2 is finished)

Case 2
1.  start server node 1
2  create and fill replicated cache with RebalanceMode.Async (as by default)
3 start client node 2
3  start server node 3 
3 immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the client node 2
It can get empty or partial results. (if rebalance on node 2 is not finished 
and query is mapped on the node 2)

It looks like problem in the 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()

case REPLICATED:
if (prj != null || part != null)
return nodes(cctx, prj, part);

if (cctx.affinityNode())
return *Collections.singletonList(cctx.localNode())*;

Collection affNodes = nodes(cctx, null, null);

return affNodes.isEmpty() ? affNodes : 
*Collections.singletonList(F.rand(affNodes))*;

case PARTITIONED:
return nodes(cctx, prj, part);

 which is executed in 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery

if executed on a just started node it obviously returns the local node 
disregarding was it rebalanced or not.

if executed on a client it returns a random affinity node, so it also can be 
not yet rebalanced node.







> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Priority: Major
>
> Case 1
> 1.  start server node 1
> 2.  create and fill replicated cache with RebalanceMode.Async (as by default)
> 3.  start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
>

[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-01-16 Thread Sergey Kosarev (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sergey Kosarev updated IGNITE-12549:

Description: 
Case 1
1. start server node 1
2. create and fill replicated cache with RebalanceMode.Async (as by default)
3. start servr node 2 
4. immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the node 2
It can get empty or partial results. (if rebalance on node 2 is finished)

Case 2
1. start server node 1
2. create and fill replicated cache with RebalanceMode.Async (as by default)
3. start client node 2
4. start server node 3 
5. immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the client node 2
It can get empty or partial results. (if rebalance on node 2 is not finished 
and query is mapped on the node 2)

It looks like problem in the 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()

case REPLICATED:
if (prj != null || part != null)
return nodes(cctx, prj, part);

if (cctx.affinityNode())
return *Collections.singletonList(cctx.localNode())*;

Collection affNodes = nodes(cctx, null, null);

return affNodes.isEmpty() ? affNodes : 
*Collections.singletonList(F.rand(affNodes))*;

case PARTITIONED:
return nodes(cctx, prj, part);

 which is executed in 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.

If executed on a just started node it obviously returns the local node 
disregarding was it rebalanced or not.

If executed on a client it returns a random affinity node, so it also can be 
not yet rebalanced node.






  was:
Case 1
1.  start server node 1
2.  create and fill replicated cache with RebalanceMode.Async (as by default)
3.  start servr node 2 
4. immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the node 2
It can get empty or partial results. (if rebalance on node 2 is finished)

Case 2
1. start server node 1
2. create and fill replicated cache with RebalanceMode.Async (as by default)
3. start client node 2
4. start server node 3 
5. immediately execute scan query  on the replicated cache((or just iterate the 
cache)) on the client node 2
It can get empty or partial results. (if rebalance on node 2 is not finished 
and query is mapped on the node 2)

It looks like problem in the 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()

case REPLICATED:
if (prj != null || part != null)
return nodes(cctx, prj, part);

if (cctx.affinityNode())
return *Collections.singletonList(cctx.localNode())*;

Collection affNodes = nodes(cctx, null, null);

return affNodes.isEmpty() ? affNodes : 
*Collections.singletonList(F.rand(affNodes))*;

case PARTITIONED:
return nodes(cctx, prj, part);

 which is executed in 
org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery

if executed on a just started node it obviously returns the local node 
disregarding was it rebalanced or not.

if executed on a client it returns a random affinity node, so it also can be 
not yet rebalanced node.







> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Priority: Major
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> 

[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-01-16 Thread Maxim Muzafarov (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Muzafarov updated IGNITE-12549:
-
Priority: Critical  (was: Major)

> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Priority: Critical
> Fix For: 2.8
>
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.
> If executed on a just started node it obviously returns the local node 
> disregarding was it rebalanced or not.
> If executed on a client it returns a random affinity node, so it also can be 
> not yet rebalanced node.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-01-16 Thread Maxim Muzafarov (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Muzafarov updated IGNITE-12549:
-
Ignite Flags:   (was: Docs Required,Release Notes Required)

> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Priority: Critical
> Fix For: 2.8
>
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.
> If executed on a just started node it obviously returns the local node 
> disregarding was it rebalanced or not.
> If executed on a client it returns a random affinity node, so it also can be 
> not yet rebalanced node.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-01-16 Thread Maxim Muzafarov (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Muzafarov updated IGNITE-12549:
-
Fix Version/s: 2.8

> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Priority: Major
> Fix For: 2.8
>
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.
> If executed on a just started node it obviously returns the local node 
> disregarding was it rebalanced or not.
> If executed on a client it returns a random affinity node, so it also can be 
> not yet rebalanced node.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-02-25 Thread Maxim Muzafarov (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Maxim Muzafarov updated IGNITE-12549:
-
Fix Version/s: (was: 2.8)
   2.8.1
   2.9

> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Assignee: Sergey Kosarev
>Priority: Critical
> Fix For: 2.9, 2.8.1
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.
> If executed on a just started node it obviously returns the local node 
> disregarding was it rebalanced or not.
> If executed on a client it returns a random affinity node, so it also can be 
> not yet rebalanced node.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-04-07 Thread Ilya Kasnacheev (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ilya Kasnacheev updated IGNITE-12549:
-
Fix Version/s: (was: 2.9)
   2.8.1

> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Assignee: Sergey Kosarev
>Priority: Critical
> Fix For: 2.8.1
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.
> If executed on a just started node it obviously returns the local node 
> disregarding was it rebalanced or not.
> If executed on a client it returns a random affinity node, so it also can be 
> not yet rebalanced node.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (IGNITE-12549) Scan query/iterator on a replicated cache may get wrong results

2020-04-07 Thread Ilya Kasnacheev (Jira)


 [ 
https://issues.apache.org/jira/browse/IGNITE-12549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ilya Kasnacheev updated IGNITE-12549:
-
Release Note: Fixed incorrect iteration of replicated cache during 
rebalance.

> Scan query/iterator on a replicated cache may get wrong results
> ---
>
> Key: IGNITE-12549
> URL: https://issues.apache.org/jira/browse/IGNITE-12549
> Project: Ignite
>  Issue Type: Bug
>  Components: cache
>Affects Versions: 2.7.6
>Reporter: Sergey Kosarev
>Assignee: Sergey Kosarev
>Priority: Critical
> Fix For: 2.8.1
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> Case 1
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start servr node 2 
> 4. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the node 2
> It can get empty or partial results. (if rebalance on node 2 is finished)
> Case 2
> 1. start server node 1
> 2. create and fill replicated cache with RebalanceMode.Async (as by default)
> 3. start client node 2
> 4. start server node 3 
> 5. immediately execute scan query  on the replicated cache((or just iterate 
> the cache)) on the client node 2
> It can get empty or partial results. (if rebalance on node 2 is not finished 
> and query is mapped on the node 2)
> It looks like problem in the 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#nodes()
> case REPLICATED:
> if (prj != null || part != null)
> return nodes(cctx, prj, part);
> if (cctx.affinityNode())
> return *Collections.singletonList(cctx.localNode())*;
> Collection affNodes = nodes(cctx, null, null);
> return affNodes.isEmpty() ? affNodes : 
> *Collections.singletonList(F.rand(affNodes))*;
> case PARTITIONED:
> return nodes(cctx, prj, part);
>  which is executed in 
> org.apache.ignite.internal.processors.cache.query.GridCacheQueryAdapter#executeScanQuery.
> If executed on a just started node it obviously returns the local node 
> disregarding was it rebalanced or not.
> If executed on a client it returns a random affinity node, so it also can be 
> not yet rebalanced node.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)