Skip to content

Conversation

@ravishankar15
Copy link
Contributor

Fix #7144

Added numConsumingSegmentsProcessed, numConsumingSegmentsMatched to broker response metaData

I am assuming,
numConsumingSegmentsProcessed to be a sub set of numSegmentsProcessed
and numConsumingSegmentsMatched to be a sub set of numSegmentsMatched

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2022

Codecov Report

Merging #9092 (fda1240) into master (dc2deb8) will increase coverage by 8.65%.
The diff coverage is 95.74%.

@@             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     
Flag Coverage Δ
integration1 26.33% <95.74%> (-0.11%) ⬇️
integration2 24.59% <95.74%> (-0.12%) ⬇️
unittests2 15.29% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...core/operator/blocks/IntermediateResultsBlock.java 66.51% <80.00%> (+0.65%) ⬆️
...roker/requesthandler/BaseBrokerRequestHandler.java 73.31% <100.00%> (+9.39%) ⬆️
...t/common/response/broker/BrokerResponseNative.java 91.12% <100.00%> (+0.44%) ⬆️
.../java/org/apache/pinot/common/utils/DataTable.java 95.65% <100.00%> (+0.19%) ⬆️
...ot/core/operator/combine/CombineOperatorUtils.java 100.00% <100.00%> (ø)
...core/query/executor/ServerQueryExecutorV1Impl.java 77.63% <100.00%> (-2.84%) ⬇️
...che/pinot/core/query/reduce/BaseReduceService.java 92.14% <100.00%> (+0.43%) ⬆️
...che/pinot/core/query/scheduler/QueryScheduler.java 82.55% <100.00%> (+0.60%) ⬆️
...ntroller/helix/core/minion/TaskMetricsEmitter.java 34.88% <0.00%> (-51.17%) ⬇️
...ache/pinot/core/operator/docidsets/OrDocIdSet.java 86.36% <0.00%> (-13.64%) ⬇️
... and 320 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@ravishankar15 ravishankar15 force-pushed the add-metadata-broker-response branch from 37579da to d0c75e4 Compare July 22, 2022 17:26
@mcvsubbu
Copy link
Contributor

cc: @snleee

Copy link
Contributor

@PrachiKhobragade PrachiKhobragade left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Contributor

@snleee snleee left a 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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

@snleee
Copy link
Contributor

snleee commented Jul 25, 2022

@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.

@ravishankar15 ravishankar15 force-pushed the add-metadata-broker-response branch from d0c75e4 to df9dd23 Compare July 25, 2022 18:13
Copy link
Member

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?

@ravishankar15 ravishankar15 force-pushed the add-metadata-broker-response branch from 8deda42 to fda1240 Compare July 26, 2022 12:36
Copy link
Contributor

@snleee snleee left a 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 snleee merged commit 9cf7d81 into apache:master Jul 27, 2022
@ravishankar15
Copy link
Contributor Author

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 2022/07/27 04:02:38.479 ERROR [SegmentOp] [main] Upload segment verification failed, routing table has not been updated after max wait time 60000 ms. It is not related to mismatch I hope can you shed some light here for my understanding. Thanks

@snleee
Copy link
Contributor

snleee commented Jul 27, 2022

@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),
Copy link
Contributor

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

Copy link
Contributor

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

Jackie-Jiang added a commit to Jackie-Jiang/pinot that referenced this pull request Jul 28, 2022
@Jackie-Jiang
Copy link
Contributor

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

Jackie-Jiang added a commit that referenced this pull request Jul 28, 2022
@snleee
Copy link
Contributor

snleee commented Jul 28, 2022

   * ATTENTION:
   *  - Don't change existing keys.
   *  - Don't remove existing keys.
   *  - Always add new keys to the end.
   *  Otherwise, backward compatibility will be broken.

@ravishankar15 Can you re-file the PR by adding the metadata key to the end?

@ravishankar15
Copy link
Contributor Author

   * ATTENTION:
   *  - Don't change existing keys.
   *  - Don't remove existing keys.
   *  - Always add new keys to the end.
   *  Otherwise, backward compatibility will be broken.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add numConsumingSegmentsProcessed and numConsumingSegmentsMatched into the query response metadata

8 participants