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

Method getNextServerId

fdbserver/DataDistribution.actor.cpp:142–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142Optional<UID> StorageWiggler::getNextServerId(bool necessaryOnly) {
143 if (!wiggle_pq.empty()) {
144 auto [metadata, id] = wiggle_pq.top();
145 if (necessaryOnly && !necessary(id, metadata)) {
146 return {};
147 }
148 wiggle_pq.pop();
149 pq_handles.erase(id);
150 return Optional<UID>(id);
151 }
152 return Optional<UID>();
153}
154
155Future<Void> StorageWiggler::resetStats() {
156 auto newMetrics = StorageWiggleMetrics();

Calls 3

emptyMethod · 0.45
popMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected