fix: grid not retrieving resources from the new master network in a network merge #467
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The grid would only sync resources that were part of the (removed) slave network after a network merge because the storages from the master network just "remain" and don't get removed and re-added.
In 1d4d3ae an initial fix was made to ensure correct behavior for network splits, by making the grid highest-priority and relying on the moved storages re-adding themselves afterwards.
However, for network merges, it would
completely ignore storages that were already part of the new network as those remain and don't get re-added.
If the storages from the new network remain and don't get re-added, we need to notify the grid of these storages somehow (by re-syncing).
This change adds the re-syncing (replay) necessary for network merges. For network splits, it will still re-sync (replay) but won't actually do anything as the network is newly-created and empty at that point.
Fixes #366