-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-3520] Eventer doesn't trigger subsequent updates
The eventer applies the config on an object that is returned from an invocation of config.Organizations(), which returns the same reference of map in each config update. The config.Organizations() is a map from org name to config.ApplicationOrg which has the anchor peers. Due to the fact that the references are the same, the ce.lastConfig.orgMap is the same as the new orgMap of a new config update, and this makes the logic think that there has not been any update of anchor peers at every real update (of anchor peers). I fixed the bug by cloning the map, and also fixed the test in eventer_test.go(line 98) to fail when the code of the eventer.go is before the fix. Change-Id: Iede772975216a88d00badfc9d7092f92580737a8 Signed-off-by: Yacov Manevich <yacovm@il.ibm.com>
- Loading branch information
Showing
3 changed files
with
57 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters