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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle segments not tracked by partition mgr and add skipUpsertView query option #13415

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

klsince
Copy link
Contributor

@klsince klsince commented Jun 17, 2024

The upsert partition manager doesn't necessarily track all segments belonging to a table partition, e.g. segments out of metadata TTL are not tracked. So after getting validDocIds bitmaps from upsert partition managers, we should double check if any segment doesn't get its bitmap.

For segments still missing their validDocIds bitmaps, we use those tracked by the segment objects themselves, as bitmaps from those segments are not updated since loaded anyway, otherwise, they'd be tracked in one partition mgr.

Added a query option skipUpsertView to help debug the consistent upsert view feature, or bypass it cleanly in case.

Also fixed an issue when a new segment is tracked but didn't update any existing bitmaps, and we should include such segment's bitmap in the upsert snapshot view as well.

Refactored the code to separate the locking logic for different consistency modes more clearly.

=== Release Note ===

a new query option skipUpsertView was added in this PR. It's false by default. When setting true for a query, it bypasses the new feature used to provide a consistent data view for the upsert table.

Copy link
Contributor

@tibrewalpratik17 tibrewalpratik17 left a comment

Choose a reason for hiding this comment

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

LGTM!

@klsince klsince merged commit 5ec7028 into apache:master Jun 18, 2024
20 checks passed
@klsince klsince deleted the handle_untracked_segments branch June 18, 2024 00:18
@Jackie-Jiang Jackie-Jiang added Configuration Config changes (addition/deletion/change in behavior) and removed documentation labels Jun 18, 2024
@klsince klsince added the release-notes Referenced by PRs that need attention when compiling the next release notes label Jun 18, 2024
yashmayya pushed a commit to yashmayya/pinot that referenced this pull request Jul 24, 2024
…uery option (apache#13415)

* handle segments not tracked by partition mgr and add skipUpsertView query option for easy debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Configuration Config changes (addition/deletion/change in behavior) enhancement release-notes Referenced by PRs that need attention when compiling the next release notes upsert
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants