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

Fix the upsert metadata bug when adding segment with same comparison value #8590

Merged
merged 1 commit into from
Apr 26, 2022

Conversation

Jackie-Jiang
Copy link
Contributor

Fix the bug of reference check instead of value check in PartitionUpsertMetadataManager.addSegment()

@codecov-commenter
Copy link

codecov-commenter commented Apr 25, 2022

Codecov Report

Merging #8590 (94e2be8) into master (d6001a2) will decrease coverage by 5.06%.
The diff coverage is 71.42%.

❗ Current head 94e2be8 differs from pull request most recent head 8c5e48e. Consider uploading reports for the commit 8c5e48e to get more accurate results

@@             Coverage Diff              @@
##             master    #8590      +/-   ##
============================================
- Coverage     69.02%   63.95%   -5.07%     
- Complexity     4314     4317       +3     
============================================
  Files          1691     1646      -45     
  Lines         88727    86807    -1920     
  Branches      13466    13255     -211     
============================================
- Hits          61244    55519    -5725     
- Misses        23197    27267    +4070     
+ Partials       4286     4021     -265     
Flag Coverage Δ
integration2 ?
unittests1 66.98% <71.42%> (+0.03%) ⬆️
unittests2 14.16% <0.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...t/local/upsert/PartitionUpsertMetadataManager.java 76.00% <71.42%> (-0.24%) ⬇️
...va/org/apache/pinot/core/routing/RoutingTable.java 0.00% <0.00%> (-100.00%) ⬇️
...va/org/apache/pinot/common/config/NettyConfig.java 0.00% <0.00%> (-100.00%) ⬇️
...a/org/apache/pinot/common/metrics/MinionMeter.java 0.00% <0.00%> (-100.00%) ⬇️
...g/apache/pinot/common/metrics/ControllerMeter.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/BrokerQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/MinionQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
...apache/pinot/common/helix/ExtraInstanceConfig.java 0.00% <0.00%> (-100.00%) ⬇️
...ache/pinot/server/access/AccessControlFactory.java 0.00% <0.00%> (-100.00%) ⬇️
...he/pinot/common/messages/SegmentReloadMessage.java 0.00% <0.00%> (-100.00%) ⬇️
... and 332 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6001a2...8c5e48e. Read the comment docs.

@@ -103,13 +103,14 @@ public void addSegment(IndexSegment segment, Iterator<RecordInfo> recordInfoIter
(primaryKey, currentRecordLocation) -> {
if (currentRecordLocation != null) {
// Existing primary key
IndexSegment currentSegment = currentRecordLocation.getSegment();
int comparisonResult = recordInfo._comparisonValue.compareTo(currentRecordLocation.getComparisonValue());
Copy link
Contributor

@yupeng9 yupeng9 Apr 26, 2022

Choose a reason for hiding this comment

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

curious, which particular line caused the bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

line 140 in the old code (using == instead of equals() for boxed value)

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. makes sense.

@Jackie-Jiang Jackie-Jiang merged commit 1d6ac06 into apache:master Apr 26, 2022
@Jackie-Jiang Jackie-Jiang deleted the upsert_tie_fix branch April 26, 2022 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants