Vladsz83 commented on code in PR #11039:
URL: https://github.com/apache/ignite/pull/11039#discussion_r1398385385
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/platform/client/cache/ClientCachePartitionsRequest.java:
##########
@@ -187,15 +186,6 @@ private static boolean isApplicable(CacheConfiguration<?,
?> ccfg, boolean withC
if (ccfg.getCacheMode() != CacheMode.PARTITIONED)
return false;
- IgnitePredicate<?> filter = ccfg.getNodeFilter();
Review Comment:
'If there is a node filter, then we use separate
`ClientCachePartitionAwarenessGroup` for such a cache'
1) If I'm correct, we group caches with a node filter always in one
`ClientCachePartitionAwarenessGroup` with null mapping. And never send the
mapping to the client:
```
ClientCachePartitionMapping mapping = null;
if (isApplicable(cacheDesc.cacheConfiguration(), withCustomMappings))
mapping = new ClientCachePartitionMapping(assignment);
```
That is why the partition awareness is skipped for such caches. Same for
caches with custom affinity.
2) Another interesting issue is that grouping of partitions mapping doesn't
seem to work. `equals()` and `hashCode()` of
`ClientCachePartitionAwarenessGroup` do not function properly.
`ClientCachePartitionAwarenessGroup` checks `ClientCachePartitionMapping` which
checks its `HashMap<UUID, Set<Integer>> partitionMap`. The problem is that the
set is actually `ImmutableIntSet`. It has no `equals()` and `hashCode()`. Same
as the involved `BitSetIntSet`.
Could you check the fixes and the tests?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]