Skip to content

Commit

Permalink
Document meaning of undersized index lookup results
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiklohmann committed Mar 8, 2023
1 parent 60e72d1 commit 396a2c8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions libvast/src/system/passive_partition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,18 @@ partition_actor::behavior_type passive_partition(
.then(
[self, rp, start,
query_context = std::move(query_context)](const ids& hits) mutable {
if (!hits.empty() && hits.size() != self->state.events)
VAST_WARN("{} received evaluator results with wrong length: "
"expected {}, got {}",
*self, self->state.events, hits.size());
if (!hits.empty() && hits.size() != self->state.events) {
// FIXME: We run into this for at least the IP index following the
// quickstart guide in the documentation, indicating that the IP
// index returns an undersized bitmap whose length does not match
// the number of events in this partition. This _can_ cause subtle
// issues downstream because you need to very carefully handle
// this scenario, which is easy to overlook as a developer. We
// should fix this issue.
VAST_DEBUG("{} received evaluator results with wrong length: "
"expected {}, got {}",
*self, self->state.events, hits.size());
}
VAST_DEBUG("{} received results from the evaluator", *self);
duration runtime = std::chrono::steady_clock::now() - start;
auto id_str = fmt::to_string(query_context.id);
Expand Down

0 comments on commit 396a2c8

Please sign in to comment.