Hi team, i fee this is a bug. i have loaded cache with affinity key and group by queries on non affinity key returning results per node with both collocate = true/false.
i have any created INSTALL_BASE cache with key as AffinityKey<String> and value is InstallBase pojo. and affinity key is equipmentId *Query 1 -* SELECT count (*) as count, serialnumber FROM InstallBase where serialnumber= '0000031438' group by serialnumber= '0000031438' Results - on 4 node cluster *With collocated = true* : 1 - 0000031438 3 - 0000031438 *With collocated = false* : 4 - 0000031438 *Query 2 -* Select ib.*, p.count from installbase ib join (SELECT serialnumber , count (*) as count FROM InstallBase group by serialnumber) p on ib.serialnumber = p.serialnumber and ib.serialnumber = '0000031438' *With collocated = true* : 1 - 0000031438 3 - 0000031438 3 - 0000031438 3 - 0000031438 *With collocated = false* : 1 - 0000031438 3 - 0000031438 3 - 0000031438 3 - 0000031438 I see similar behavior with count queries as well. i strongly feel this is not correct behavior. Group by query on non affinity field is very common usecase. please share your view on this. Thanks