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

Method nodeSetup

fdbserver/workloads/FileSystem.actor.cpp:141–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 ACTOR Future<Void> nodeSetup(Database cx, FileSystemWorkload* self) {
142 state int i;
143 state std::vector<int> order;
144 state int nodesToSetUp = self->fileCount / self->clientCount + 1;
145 state int startingNode = nodesToSetUp * self->clientId;
146 state int batchCount = 5;
147 for (int o = 0; o <= nodesToSetUp / batchCount; o++)
148 order.push_back(o * batchCount);
149 deterministicRandom()->randomShuffle(order);
150 for (i = 0; i < order.size();) {
151 std::vector<Future<Void>> fs;
152 for (int j = 0; j < 100 && i < order.size(); j++) {
153 fs.push_back(self->setupRange(
154 cx,
155 self,
156 startingNode + order[i],
157 std::min(startingNode + order[i] + batchCount, nodesToSetUp * (self->clientId + 1))));
158 i++;
159 }
160 wait(waitForAll(fs));
161 }
162 TraceEvent("FileSetupOK")
163 .detail("ClientIdx", self->clientId)
164 .detail("ClientCount", self->clientCount)
165 .detail("StartingFile", startingNode)
166 .detail("FilesToSetUp", nodesToSetUp);
167 return Void();
168 }
169
170 ACTOR Future<Void> _start(Database cx, FileSystemWorkload* self) {
171 state FileSystemOp* operation;

Callers

nothing calls this directly

Calls 9

setupRangeMethod · 0.95
deterministicRandomFunction · 0.85
waitForAllFunction · 0.85
TraceEventClass · 0.85
randomShuffleMethod · 0.80
detailMethod · 0.80
VoidClass · 0.50
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected