-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add validation check for forward index disabled when enabling columnar segment creation #12838
Add validation check for forward index disabled when enabling columnar segment creation #12838
Conversation
4c2fca1
to
c7f5887
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we allow disabling forward index for consuming segment? Can we add a test to verify if it works?
With the change in this current PR no we won't allow disabling forward index for consuming segment as it will fail on table creation. The Regarding tests, I think the ones in |
What I was asking is when we disable forward index, will the config be picked up for consuming segment? Will the consuming segment only create inverted index, but not forward index? |
I don't think forward index can be disabled for mutable segment (see this line), not sure how it is handled right now |
Right, I was about to paste you the same link. Since forward index is always enabled by default, I don't see a reason why it's explicitly set to be disabled for realtime tables. And since with |
My point is that forward index cannot be disabled for consuming segment anyway, regardless of whether |
I did test out the cases when forward index is disabled for the realtime table. And here is the exception messages:
updated the fieldConfig to the realtime table config:
So I think it still makes sense to fail fast on table config update. |
Yeah, so basically we can add a check that forward index cannot be disabled for real-time table. It should have nothing to do with enabling columnar segment creation. |
c7f5887
to
75498ba
Compare
Ah that's good point! Adjusted the logic to only check for the table type in the latest push. @Jackie-Jiang PTAL. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with minor comment
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java
Outdated
Show resolved
Hide resolved
75498ba
to
7dfd5c6
Compare
Now that column major segment builder is enabled by default in this PR (#12770), the validation check should be added on cases where the forward index is disabled. Otherwise, the segment generation would fail and be paused. Thus, it'd be great to capture this early when the table config is added/updated.
This PR aims to add the validation check for forward index disabled when enabling columnar segment creation.