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

[FIXED] Freeze `n.Applied` for cluster when shutting down #6087

Closed MauriceVanVeen closed 2 weeks ago

MauriceVanVeen commented 2 weeks ago

During shutdown calls to js.processConsumerAssignment can short-circuit with:

    if s == nil || noMeta || shuttingDown {
        return
    }

Ensure that we don't up n.Applied and snapshot after while we're shutting down, as we can't be sure we've actually applied those entries.

Signed-off-by: Maurice van Veen github@mauricevanveen.com