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

[BugFix] The weights for dimension fields not getting set for some ta… #12369

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PrachiKhobragade
Copy link
Contributor

@PrachiKhobragade PrachiKhobragade commented Feb 5, 2024

…bles during PinotTablePartitionRule

The FixedLenBitset array is set during PinotTablePartitionRule with dimension weights. The length of this array is same as numDimensions in the table. When the parsePredicateList is called in PinotTablePartitionRule https://github.com/apache/pinot/blob/master/pinot-controller/src/main/java/org/apache/pinot/controller/recommender/rules/impl/PinotTablePartitionRule.java#L258
The index of the dimension colname may fall out of range for FixedLenBitset array, and thus never get set, leading to partition column not being correctly detected by the algorithm.

…bles during PinotTablePartitionRule

While FixedLenBitset is being set for weights, the dimension weight being added can fall out of range of the FixedLenBitset length and
not get added
@codecov-commenter
Copy link

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3cefed5) 61.72% compared to head (0c59895) 34.85%.
Report is 1 commits behind head on master.

Files Patch % Lines
.../pinot/controller/recommender/io/InputManager.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #12369       +/-   ##
=============================================
- Coverage     61.72%   34.85%   -26.88%     
- Complexity      207      953      +746     
=============================================
  Files          2426     2350       -76     
  Lines        132682   128936     -3746     
  Branches      20506    19948      -558     
=============================================
- Hits          81901    44942    -36959     
- Misses        44765    80772    +36007     
+ Partials       6016     3222     -2794     
Flag Coverage Δ
custom-integration1 ?
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 ?
java-11 <0.01% <0.00%> (-61.67%) ⬇️
java-21 46.73% <ø> (-14.86%) ⬇️
skip-bytebuffers-false 34.83% <0.00%> (-26.83%) ⬇️
skip-bytebuffers-true 46.70% <ø> (-14.88%) ⬇️
temurin 34.85% <0.00%> (-26.88%) ⬇️
unittests 46.73% <ø> (-15.00%) ⬇️
unittests1 46.73% <ø> (-0.18%) ⬇️
unittests2 ?

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jasperjiaguo jasperjiaguo left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! Can you take a look at the failed test?

Copy link
Contributor

@sajjad-moradi sajjad-moradi left a comment

Choose a reason for hiding this comment

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

Other than fixing the failing test, could you also make the following small changes on PinotTablePartitionRule on this PR (or in a separate PR):

Currently provided qps and latency are checked at the beginning of the rule:

     if (_input.getQps()
        < _params._thresholdMinQpsPartition) { //For a table whose QPS < Q (say 200 or 300) NO partitioning is needed.
      LOGGER.info("*Input QPS {} < threshold {}, no partition needed", _input.getQps(),
          _params._thresholdMinQpsPartition);
      return;
    }
    if (_input.getLatencySLA()
        > _params._thresholdMaxLatencySlaPartition) { //For a table whose latency SLA > L (say 1000ms) NO
      // partitioning is needed.
      LOGGER.info("*Input SLA {} > threshold {}, no partition needed", _input.getLatencySLA(),
          _params._thresholdMaxLatencySlaPartition);
      return;
    }

There's really no need to check qps, because even for low qps tables, if the latency requirement is strict, partitioning is going to be required.
The other suggestion is to bring down the default latency SLA from 1s to 300ms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants