Skip to content

Move away from using the gRPC address of a node as the primary key in client pool #3333

@guilload

Description

@guilload
  1. Node foo joins the cluster: Node { NodeId: "foo", GenerationId: 0, grpc_addr: "::1:12345" }
  2. Client pool: Pool {"::1::12345": "foo:0" }
  3. Node foo restarts and rejoins the cluster: Node { NodeId: "foo", GenerationId: 1, grpc_addr: "::1:12345" }
  4. Chitchat detects the new node, client pool receives add event and replaces node: Pool {"::1::12345": "foo:1" }
  5. Chitchat detects the dead node, client pool receives remove event and deletes node: Pool {}
  6. Chitchat node key update, client pool receives update event and adds node: Pool {"::1::12345": "foo:1" }

Things go well if the dead node is removed before the new node is added. Things go ok if the new node is updated frequently. Things go wrong if the node is not updated frequently or at all.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions