This updates the metalayer recovery so that consumer assignments are grouped by the stream recovery key, such that a stream removal can also clean up any pending consumer updates.
Previously, if the metalayer recovered the following:
Stream update assignment
Consumer update assignment
Stream remove assignment
Stream update assignment
... then 2 would survive the recovery process because 4 cancelled out 3 and 3 didn't cancel out 2.
This updates the metalayer recovery so that consumer assignments are grouped by the stream recovery key, such that a stream removal can also clean up any pending consumer updates.
Previously, if the metalayer recovered the following:
... then 2 would survive the recovery process because 4 cancelled out 3 and 3 didn't cancel out 2.
Signed-off-by: Neil Twigg neil@nats.io Co-authored-by: Maurice van Veen github@mauricevanveen.com