superfly / corrosion

Gossip-based service discovery (and more) for large distributed systems.
https://superfly.github.io/corrosion/
Apache License 2.0
684 stars 21 forks source link

Add function to handle subscriptions when applying buffered changes #214

Closed jeromegn closed 2 months ago

jeromegn commented 4 months ago

We discovered we weren't processing subscriptions for changes being applied all at once when all buffered versions were received. This caused some changes not to update subscriptions.

This PR adds a function to handle exactly that situation.

It's a bit painful and some buffering in memory is required unless we change the logic more extensively.

jeromegn commented 3 months ago

@somtochiama I would appreciate a review on this. I think this works as intended and will prevent heartburn in the future.