Skip to content

Commit

Permalink
Reformat, clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
msm-code committed Oct 17, 2024
1 parent 6e341c8 commit 45de016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions libursa/OnDiskDataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ QueryResult OnDiskDataset::query(const Query &query,
}
}
},
&string_cache,
counters);
&string_cache, counters);
}

void OnDiskDataset::execute(const Query &query, ResultWriter *out,
Expand Down
5 changes: 2 additions & 3 deletions libursa/Query.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ QueryResult Query::run(const QueryPrimitive &primitive,
auto cache_key = get_cache_key();
auto cached_it = cache->find(cache_key);
if (cached_it != cache->end()) {
spdlog::info("found a cached string {}!", cached_it->second.size());
return QueryResult(cached_it->second.clone());
}
auto result = QueryResult::everything();
Expand All @@ -262,7 +261,6 @@ QueryResult Query::run(const QueryPrimitive &primitive,
}
}
if (!cache_key.empty() && !result.is_everything()) {
spdlog::debug("caching (len: {})...", cache_key.size());
cache->emplace(std::move(cache_key), result.vector().clone());
}
return result;
Expand Down Expand Up @@ -292,7 +290,8 @@ QueryResult Query::run(const QueryPrimitive &primitive,
int cutoff = count;
int nonempty_sources = queries.size();
for (const auto &query : queries) {
QueryResult next = query.run(primitive, prefetcher, cache, counters);
QueryResult next =
query.run(primitive, prefetcher, cache, counters);
if (next.is_everything()) {
cutoff -= 1;
if (cutoff <= 0) {
Expand Down

0 comments on commit 45de016

Please sign in to comment.