MCPcopy Create free account
hub / github.com/apple/foundationdb / bestLocationFor

Method bestLocationFor

fdbserver/LogSystem.cpp:181–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181int LogSet::bestLocationFor(Tag tag) {
182 if (locality == tagLocalitySatellite) {
183 return satelliteTagLocations[tag == txsTag ? 0 : tag.id + 1][0];
184 }
185
186 // the following logic supports upgrades from 5.X
187 if (tag == txsTag)
188 return txsTagOld % logServers.size();
189 return tag.id % logServers.size();
190}
191
192void LogSet::updateLocalitySet(std::vector<LocalityData> const& localities) {
193 LocalityMap<int>* logServerMap;

Callers 4

peekAllMethod · 0.80
peekLocalMethod · 0.80
peekLogRouterMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected