Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Response flag. All server responses include flags field, and server sets a flag when the assignment has changed since the last response. It is up to the client to retrieve updated assignment when needed. This mechanism is used in Ignite 2.x. 
    Pros: Low overhead, no extra network traffic.
    Cons: Idle clients do not get Unlike Ignite 2.x, there is no concept of TopologyVersion in Ignite 3. So when there are multiple server connections, a notification for the same assignment update will come from all of them, and it is not possible to tell whether it was the same update or a new one. This may cause unnecessary assignment update requests. A workaround is to use only one connection to track assignment changes. Even if there is no activity on this connection, heartbeats (IEP-83) will trigger the update.

  2. Server → client notification. As soon as assignment changes, server sends a message to all clients.
    Pros: Immediate update for all clients.
    Cons: Increased network traffic and server load. Some clients may not need the update at all (not all APIs require this).

  3. PrimaryReplicaMissException (suggested in
    Jira
    serverASF JIRA
    serverId5aa69414-a9e9-3523-82ec-879b028fb15b
    keyIGNITE-17394
    comments).
    Pros: No protocol changes.
    Cons: Retry is required on replica miss (complicated & inefficient). Using exceptions for control flow.

The first approach (response flag) is battle tested and seems to be the most optimal. 

Discussion Links

...