-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add consuming metadata to broker response #9092
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 consuming metadata to broker response #9092
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9092 +/- ##
============================================
+ Coverage 28.52% 37.18% +8.65%
- Complexity 51 193 +142
============================================
Files 1826 1838 +12
Lines 96961 97358 +397
Branches 14627 14669 +42
============================================
+ Hits 27662 36201 +8539
+ Misses 66672 58224 -8448
- Partials 2627 2933 +306
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. |
37579da to
d0c75e4
Compare
|
cc: @snleee |
PrachiKhobragade
left a comment
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.
Looks good
snleee
left a comment
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.
Somehow the regression test failed. Let's fix the issue.
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.
Can you remove the try-catch block?
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.
@snleee I am not sure if we can remove that for queries with limit 0 like SELECT * FROM testTable LIMIT 0 we are passing EmptySelectionOperator Instance in there which does not implement the getIndexSegment() hence there will be an exception we have a explicit test case to prevent that SelectionCombineOperatorTest.testSelectionLimit0 Since we are using the interface (Operator) to reference in the for loop and interface has explicit check to throw the exception I think it is better to enclose it within the try catch block.
Also is the regression failing because of this try catch ? I could not see any logs associated with the same ? Can you please help me understand the failure so that I can fix the issue. 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.
@ravishankar15 I thought getIndexSegment() would return null but the interface actually throw UnsupportedOperationException and you're handling it correctly.
Let me take a look on the regression test and try to check why it fails.
|
@ravishankar15 I don't see that your code change is related to the failure in the compatibility test (it fails on segment upload). Can you try to rebase the code with the upstream master? Let's see if it fixes the issue. |
d0c75e4 to
df9dd23
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.
Can we rename the below createSegment() method to sth like createOfflineSegment() since you've added a new createRealtimeSegment() method here?
Rename the createSegment method name in test
8deda42 to
fda1240
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.
It looks that the compatibility test will start to pass after we forcefully merge this PR because the existing job would use the old test set.
@ravishankar15 Thanks you for the contribution!
@snleee The error says something like this |
|
@ravishankar15 Yeah I also saw that the compatibility test is failing on the routing table update. I will take a look on this and see if we can resolve it without rolling back this PR. |
| NUM_SEGMENTS_PROCESSED("numSegmentsProcessed", MetadataValueType.INT), | ||
| NUM_SEGMENTS_MATCHED("numSegmentsMatched", MetadataValueType.INT), | ||
| NUM_CONSUMING_SEGMENTS_QUERIED("numConsumingSegmentsQueried", MetadataValueType.INT), | ||
| NUM_CONSUMING_SEGMENTS_PROCESSED("numConsumingSegmentsProcessed", MetadataValueType.INT), |
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.
(MAJOR) Please revert this PR, and re-check it in after it passes the compatibility test. We cannot add MetadataKey in the middle because we use ordinal to encode the key. See the comment of this enum
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.
+1. This is a breaking change
This reverts commit 9cf7d81.
|
Created #9119 to revert this commit for now. We can open a new PR to check it in after fixing the compatible issue. IIRC, the compatibility test won't compare the metadata |
@ravishankar15 Can you re-file the PR by adding the metadata key to the end? |
Yeah sure @snleee I will raise a separate PR with all the changes |
Fix #7144
Added numConsumingSegmentsProcessed, numConsumingSegmentsMatched to broker response metaData
I am assuming,
numConsumingSegmentsProcessedto be a sub set ofnumSegmentsProcessedand
numConsumingSegmentsMatchedto be a sub set ofnumSegmentsMatched