Fix notifyBytes bug: infinite vector item creation. (version 2)
This commit is contained in:
parent
e0bf36a14e
commit
92f83c7756
|
@ -184,7 +184,9 @@ void StorageServerMetrics::notifyBytes(
|
|||
|
||||
StorageMetrics notifyMetrics;
|
||||
notifyMetrics.bytes = bytes;
|
||||
for (int i = 0; i < shard.value().size(); i++) {
|
||||
auto size = shard->cvalue().size();
|
||||
for (int i = 0; i < size; i++) {
|
||||
// fmt::print("NotifyBytes {} {}\n", shard->value().size(), shard->range().toString());
|
||||
CODE_PROBE(true, "notifyBytes");
|
||||
shard.value()[i].send(notifyMetrics);
|
||||
}
|
||||
|
|
|
@ -12928,8 +12928,8 @@ ACTOR Future<Void> waitMetrics(StorageServerMetrics* self, WaitMetricsRequest re
|
|||
state Error error = success();
|
||||
state bool timedout = false;
|
||||
|
||||
// state UID metricReqId = deterministicRandom()->randomUniqueID();
|
||||
DisabledTraceEvent(SevDebug, "WaitMetrics", metricReqId)
|
||||
state UID metricReqId = deterministicRandom()->randomUniqueID();
|
||||
TraceEvent(SevDebug, "WaitMetrics", metricReqId)
|
||||
.detail("Keys", req.keys)
|
||||
.detail("Metrics", metrics.toString())
|
||||
.detail("ReqMin", req.min.toString())
|
||||
|
@ -13000,7 +13000,7 @@ ACTOR Future<Void> waitMetrics(StorageServerMetrics* self, WaitMetricsRequest re
|
|||
|
||||
wait(delay(0)); // prevent iterator invalidation of functions sending changes
|
||||
}
|
||||
|
||||
// fmt::print("PopWaitMetricsMap {}\n", req.keys.toString());
|
||||
auto rs = self->waitMetricsMap.modify(req.keys);
|
||||
for (auto i = rs.begin(); i != rs.end(); ++i) {
|
||||
auto& x = i->value();
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
MockDDTestWorkload::setup(cx);
|
||||
// populate sharedMgs before run DD
|
||||
populateMgs();
|
||||
// sharedMgs->addStoragePerProcess();
|
||||
sharedMgs->addStoragePerProcess();
|
||||
mock = makeReference<DDMockTxnProcessor>(sharedMgs);
|
||||
return Void();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue