Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CCDB/src/CcdbApi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1689,9 +1689,9 @@ void CcdbApi::vectoredLoadFileToMemory(std::vector<RequestContext>& requestConte
// Save snapshots
for (int i = 0; i < requestContexts.size(); i++) {
auto& requestContext = requestContexts.at(i);
logReading(requestContext.path, requestContext.timestamp, &requestContext.headers,
fmt::format("{}{}", requestContext.considerSnapshot ? "load to memory" : "retrieve", fromSnapshots.at(i) ? " from snapshot" : ""));
if (!requestContext.dest.empty()) {
logReading(requestContext.path, requestContext.timestamp, &requestContext.headers,
fmt::format("{}{}", requestContext.considerSnapshot ? "load to memory" : "retrieve", fromSnapshots.at(i) ? " from snapshot" : ""));
if (requestContext.considerSnapshot && fromSnapshots.at(i) != 2) {
saveSnapshot(requestContext);
}
Expand Down
4 changes: 2 additions & 2 deletions Framework/CCDBSupport/src/CCDBHelpers.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ auto populateCacheWith(std::shared_ptr<CCDBFetcherHelper> const& helper,
const auto url2uuid = helper->mapURL2UUID.find(path);
if (url2uuid != helper->mapURL2UUID.end()) {
etag = url2uuid->second.etag;
checkValidity = int(timingInfo.tfCounter - url2uuid->second.lastCheckedTF) >= chRate;
checkValidity = std::abs(int(timingInfo.tfCounter - url2uuid->second.lastCheckedTF)) >= chRate;
} else {
checkValidity = true; // never skip check if the cache is empty
}
Expand Down Expand Up @@ -335,7 +335,7 @@ AlgorithmSpec CCDBHelpers::fetchFromCCDB()
std::map<std::string, std::string> metadata;
std::map<std::string, std::string> headers;
std::string etag;
bool checkValidity = int(timingInfo.tfCounter - helper->lastCheckedTFCounterOrbReset) >= helper->queryPeriodGlo;
bool checkValidity = std::abs(int(timingInfo.tfCounter - helper->lastCheckedTFCounterOrbReset)) >= helper->queryPeriodGlo;
const auto url2uuid = helper->mapURL2UUID.find(path);
if (url2uuid != helper->mapURL2UUID.end()) {
etag = url2uuid->second.etag;
Expand Down