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

Method getReadHotRanges

fdbclient/NativeAPI.actor.cpp:7535–7556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7533}
7534
7535ACTOR Future<Standalone<VectorRef<DDMetricsRef>>> waitDataDistributionMetricsList(Database cx,
7536 KeyRange keys,
7537 int shardLimit) {
7538 loop {
7539 choose {
7540 when(wait(cx->onProxiesChanged())) {}
7541 when(ErrorOr<GetDDMetricsReply> rep =
7542 wait(errorOr(basicLoadBalance(cx->getCommitProxies(UseProvisionalProxies::False),
7543 &CommitProxyInterface::getDDMetrics,
7544 GetDDMetricsRequest(keys, shardLimit))))) {
7545 if (rep.isError()) {
7546 throw rep.getError();
7547 }
7548 return rep.get().storageMetricsList;
7549 }
7550 }
7551 }
7552}
7553
7554Future<Standalone<VectorRef<ReadHotRangeWithMetrics>>> DatabaseContext::getReadHotRanges(KeyRange const& keys) {
7555 return ::getReadHotRanges(Database(Reference<DatabaseContext>::addRef(this)), keys);
7556}
7557
7558ACTOR Future<Standalone<VectorRef<KeyRef>>> getRangeSplitPoints(Reference<TransactionState> trState,
7559 KeyRange keys,

Callers

nothing calls this directly

Calls 10

errorOrFunction · 0.85
ifFunction · 0.85
onProxiesChangedMethod · 0.80
getCommitProxiesMethod · 0.80
whenFunction · 0.70
getMethod · 0.65
GetDDMetricsRequestClass · 0.50
DatabaseClass · 0.50
isErrorMethod · 0.45
getErrorMethod · 0.45

Tested by

no test coverage detected