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

Method getPseudoPopTag

fdbserver/TagPartitionedLogSystem.actor.cpp:190–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190Tag TagPartitionedLogSystem::getPseudoPopTag(Tag tag, ProcessClass::ClassType type) const {
191 switch (type) {
192 case ProcessClass::LogRouterClass:
193 if (tag.locality == tagLocalityLogRouter) {
194 ASSERT(pseudoLocalities.count(tagLocalityLogRouterMapped) > 0);
195 tag.locality = tagLocalityLogRouterMapped;
196 }
197 break;
198
199 case ProcessClass::BackupClass:
200 if (tag.locality == tagLocalityLogRouter) {
201 ASSERT(pseudoLocalities.count(tagLocalityBackup) > 0);
202 tag.locality = tagLocalityBackup;
203 }
204 break;
205
206 default: // This should be an error at caller site.
207 break;
208 }
209 return tag;
210}
211
212bool TagPartitionedLogSystem::hasPseudoLocality(int8_t locality) const {
213 return pseudoLocalities.count(locality) > 0;

Callers 2

popFunction · 0.80

Calls 1

countMethod · 0.65

Tested by

no test coverage detected