Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in query evaluation for new partitions #2295

Merged
merged 1 commit into from May 23, 2022

Conversation

dominiklohmann
Copy link
Member

@dominiklohmann dominiklohmann commented May 23, 2022

This fixes a rather annoying timing bug: We create new active partitions on demand, and immediately feed them events. If, however, a query arrives it may be scheduled before any of the events were added to the active partition, leading to it not having any indexers, which in turn leads to it not having a combined layout. The query evaluation wrongly assumed that every partition always had a combined layout, which caused a crash.

馃摑 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

馃幆 Review Instructions

Follow the changed logic and verify that this was indeed an issue.

@dominiklohmann dominiklohmann added the bug Incorrect behavior label May 23, 2022
@dominiklohmann dominiklohmann requested a review from a team May 23, 2022 09:36
This fixes a rather annoying timing bug: We create new active partitions on
demand, and immediately feed them events. If, however, a query arrives it may be
scheduled before any of the events were added to the active partition, leading
to it not having any indexers, which in turn leads to it not having a combined
layout. The query evaluation wrongly assumed that every partition always had a
combined layout, which caused a crash.
@dominiklohmann dominiklohmann force-pushed the story/sc-34111/active-partition-crash branch from a96a9a1 to c770183 Compare May 23, 2022 09:39
@tobim tobim self-requested a review May 23, 2022 09:51
@tobim
Copy link
Member

tobim commented May 23, 2022

I'll test this by adding a return after creating the first active partition.

Copy link
Member

@tobim tobim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that the newly introduced path gets taken when the first slice is delayed manually.

@dominiklohmann dominiklohmann merged commit f7c9b1d into master May 23, 2022
@dominiklohmann dominiklohmann deleted the story/sc-34111/active-partition-crash branch May 23, 2022 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior
Projects
None yet
2 participants