nats-io / nats-server

High-Performance server for NATS.io, the cloud and edge native messaging system.
https://nats.io
Apache License 2.0
16k stars 1.41k forks source link

Don't process multiple stream assignment responses for the same assignment #6121

Closed neilalexander closed 1 week ago

neilalexander commented 1 week ago

If we are reassigning a stream assignment to a different placement, i.e. due to insufficient resources or another placement error, then don't process any further stream assignment results for that stream until the new assignment is processed. Otherwise we might generate multiple new assignments unnecessarily which could delete/recreate/update the stream multiple times, potentially on different peer sets.

This should also de-flake TestJetStreamSuperClusterConcurrentOverflow.

Signed-off-by: Neil Twigg neil@nats.io