avoid updating the same endpoint multiple times

This commit is contained in:
Evan Tschannen 2020-04-11 21:05:30 -07:00
parent 8f78912483
commit 9b5130194d
1 changed files with 1 additions and 0 deletions

View File

@ -3038,6 +3038,7 @@ ACTOR Future<Void> dbInfoUpdater( ClusterControllerData* self ) {
self->updateDBInfoEndpoints.push_back(it.second.details.interf.updateServerDBInfo.getEndpoint());
}
} else {
uniquify(self->updateDBInfoEndpoints);
for(int i = 0; i < self->updateDBInfoEndpoints.size(); i++) {
if(self->removedDBInfoEndpoints.count(self->updateDBInfoEndpoints[i])) {
self->updateDBInfoEndpoints[i] = self->updateDBInfoEndpoints.back();