Results from read hot range requests were not held by the results arena.
This commit is contained in:
parent
e639c44180
commit
800ece286d
|
@ -3889,13 +3889,22 @@ ACTOR Future<Standalone<VectorRef<ReadHotRangeWithMetrics>>> getReadHotRanges(Da
|
||||||
}
|
}
|
||||||
|
|
||||||
wait(waitForAll(fReplies));
|
wait(waitForAll(fReplies));
|
||||||
Standalone<VectorRef<ReadHotRangeWithMetrics>> results;
|
|
||||||
|
|
||||||
for (int i = 0; i < nLocs; i++)
|
if(nLocs == 0) {
|
||||||
results.append(results.arena(), fReplies[i].get().readHotRanges.begin(),
|
TEST(true); // Single-shard read hot range request
|
||||||
fReplies[i].get().readHotRanges.size());
|
return fReplies[0].get().readHotRanges;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
TEST(true); // Multi-shard read hot range request
|
||||||
|
Standalone<VectorRef<ReadHotRangeWithMetrics>> results;
|
||||||
|
for (int i = 0; i < nLocs; i++) {
|
||||||
|
results.append(results.arena(), fReplies[i].get().readHotRanges.begin(),
|
||||||
|
fReplies[i].get().readHotRanges.size());
|
||||||
|
results.arena().dependsOn(fReplies[i].get().readHotRanges.arena());
|
||||||
|
}
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
}
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
if (e.code() != error_code_wrong_shard_server && e.code() != error_code_all_alternatives_failed) {
|
if (e.code() != error_code_wrong_shard_server && e.code() != error_code_all_alternatives_failed) {
|
||||||
TraceEvent(SevError, "GetReadHotSubRangesError").error(e);
|
TraceEvent(SevError, "GetReadHotSubRangesError").error(e);
|
||||||
|
|
Loading…
Reference in New Issue