Skip to content

Conversation

@etschannen
Copy link
Contributor

No description provided.

@etschannen etschannen requested a review from vishesh July 29, 2019 06:55
when( state ClientDBInfo ni = wait( brokenPromiseToNever( knownLeader->get().get().clientInterface.openDatabase.getReply( req ) ) ) ) {
TraceEvent("MonitorLeaderForProxiesGotClientInfo", knownLeader->get().get().clientInterface.id()).detail("Proxy0", ni.proxies.size() ? ni.proxies[0].id() : UID()).detail("ClientID", ni.id);
if(ni.proxies.size() > CLIENT_KNOBS->MAX_CLIENT_PROXY_CONNECTIONS) {
deterministicRandom()->randomShuffle(ni.proxies);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are mutating the list of proxies here, monitorMasterProxiesChanged will probably get triggered even when it shouldn't. Don't think it should matter much though, but that may also mean that ACTOR is probably unnecessary as it seems that Future is effectively clientDBInfo->onChange() as we'll shuffle this everytime which would make that ACTOR trigger onMasterProxyChanged() each time.

@alexmiller-apple
Copy link
Contributor

@fdb-build, test macos please

… and continue connecting to the wrong cluster
…ould have made all the clients talking to that coordinator connect to the same set of proxies

optimized the code to avoid re-randomizing the same list of proxies
@etschannen etschannen merged commit efb9131 into apple:master Jul 31, 2019
@etschannen etschannen deleted the feature-client-proxy-connections branch July 31, 2019 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants