LimitFilter Doesn't Work Properly With Data Affinity
(Doc ID 2560142.1)
Last updated on AUGUST 28, 2023
Applies to:Oracle Coherence - Version 22.214.171.124.0 and later
Information in this document applies to any platform.
On : 126.96.36.199.0 version, Clustering,Network,Membership
LimitFilter doesn't work properly with data affinity
- We are using Coherence Data Grid 188.8.131.52.0. The deployment topology is: 4 storage nodes, 2 proxy nodes, and extended client.
- We have a cache ServiceInstance, that has a composite PK class ServiceInstancePK, which contains: mobileTelephoneNum and customerId.
- In the extended client, we use LimitFilter to query on the ServiceInstance cache and use limitFilter.setPage to support pagination request. The code is:
- We use data affinity on ServiceInstance cache by making the ServiceInstancePK implementing KeyAssociation interface
- In the ServiceInstancePK class, if we specify mobileTelephoneNum as the associated key, everything works fine.
- However, if we specify customerId as the associated key, the limitFilter stops working:
- the first page returns less than expected number of results
- the 2nd and subsequent pages return nothing
- if we don't pass the comparator into the limit filter, it returns normally, but a pagniation without sorting is meaningless in our use case
- if we use only 1 storage node, which means all data are stored in that node, it works fine
The main difference between mobileTelephoneNum and customerId in this case is the scale:
- 1 mobileTelephoneNum is associated to a few ServiceInstance objects
- 1 customerId may be associated up to 100 K ServiceInstance objects. In the above scenario, it is 28K ServiceInstance objects.
There is no error in the logs. Source codes are attached.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document