Search code examples
ignite

How can I check in RemoteFilte, if current node is primary or backup?


I have two nodes in Partitioned mode and I use Continuous Query. When I put value to cache I see RemoteFilter is working twice (on primary node and on backup node). How can I check in filter if current node is primary or backup?


Solution

  • Well, there are several methods on Affinity API to help you detect whether a node is a primary or backup. However, if the topology changes while checking the Affinity API, then you may end up on a primary node that became a backup or vice versa.

    There is a way to check this deterministically, which is described in IGNITE-3878 ticket. This should come in the next release.