Skip to content

Commit 3dda7ea

Browse files
committed
DPL Analysis: look up the CCDB output buffer only when fetching
populateCacheWith created the pmr vector for the object, which matches the output route and looks up its transport, for every FetchOp. On a cache hit the vector is never used, and the analysis CCDB fetcher issues one FetchOp per column for every row of the source table. Create it only where an object is actually requested from the server.
1 parent 933d59e commit 3dda7ea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Framework/CCDBSupport/src/CCDBFetcherHelper.cxx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ auto CCDBFetcherHelper::populateCacheWith(std::shared_ptr<CCDBFetcherHelper> con
179179
O2_SIGNPOST_EVENT_EMIT(ccdb, sid, "populateCacheWith", "Fetching object for route %{public}s", DataSpecUtils::describe(op.spec).data());
180180
auto concrete = DataSpecUtils::asConcreteDataMatcher(op.spec);
181181
Output output{concrete.origin, concrete.description, concrete.subSpec};
182-
auto&& v = allocator.makeVector<char>(output);
183182
std::map<std::string, std::string> metadata;
184183
std::map<std::string, std::string> headers;
185184
std::string path = op.url;
@@ -232,6 +231,7 @@ auto CCDBFetcherHelper::populateCacheWith(std::shared_ptr<CCDBFetcherHelper> con
232231

233232
const auto& api = helper->getAPI(path);
234233
if (checkValidity && (!api.isSnapshotMode() || etag.empty())) { // in the snapshot mode the object needs to be fetched only once
234+
auto&& v = allocator.makeVector<char>(output);
235235
LOGP(detail, "Loading {} for timestamp {}", path, timestampToUse);
236236
api.loadFileToMemory(v, path, metadata, timestampToUse, &headers, etag, helper->createdNotAfter, helper->createdNotBefore);
237237
if ((headers.count("Error") != 0) || (etag.empty() && v.empty())) {

0 commit comments

Comments
 (0)