Skip to content

Fix for flaky test ForwardIndexHandlerTest.testEnableDictionaryForMultipleColumns#10366

Merged
Jackie-Jiang merged 4 commits intoapache:masterfrom
somandal:test-fix
Mar 2, 2023
Merged

Fix for flaky test ForwardIndexHandlerTest.testEnableDictionaryForMultipleColumns#10366
Jackie-Jiang merged 4 commits intoapache:masterfrom
somandal:test-fix

Conversation

@somandal
Copy link
Contributor

@somandal somandal commented Mar 2, 2023

This PR fixes the flaky test ForwardIndexHandlerTest.testEnableDictionaryForMultipleColumns as identified in issue: #10365

Issue: Only forward index enabled columns should be used in this test, while due to choosing a random column a forward index disabled column can get picked sometimes.

Fix: Only pick forward index enabled columns

This also fixes a redundant if clause in ForwardIndexHandler

cc @Jackie-Jiang @vvivekiyer @siddharthteotia

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2023

Codecov Report

Merging #10366 (479b7e4) into master (9c7e771) will increase coverage by 21.44%.
The diff coverage is 0.00%.

@@              Coverage Diff              @@
##             master   #10366       +/-   ##
=============================================
+ Coverage     13.76%   35.21%   +21.44%     
- Complexity      231      254       +23     
=============================================
  Files          1979     2033       +54     
  Lines        107729   110189     +2460     
  Branches      16457    16749      +292     
=============================================
+ Hits          14831    38800    +23969     
+ Misses        91717    68048    -23669     
- Partials       1181     3341     +2160     
Flag Coverage Δ
integration1 24.53% <0.00%> (?)
integration2 24.47% <0.00%> (?)
unittests2 13.76% <0.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...ocal/segment/index/loader/ForwardIndexHandler.java 0.00% <0.00%> (ø)
...server/starter/helix/HelixInstanceDataManager.java 74.18% <0.00%> (ø)
...pache/pinot/plugin/metrics/yammer/YammerMeter.java 55.55% <0.00%> (ø)
...not/plugin/inputformat/csv/CSVRecordExtractor.java 0.00% <0.00%> (ø)
...pache/pinot/plugin/metrics/yammer/YammerTimer.java 33.33% <0.00%> (ø)
...ot/plugin/inputformat/json/JSONMessageDecoder.java 0.00% <0.00%> (ø)
.../pinot/server/api/resources/PinotServerLogger.java 0.00% <0.00%> (ø)
...gin/inputformat/avro/SimpleAvroMessageDecoder.java 0.00% <0.00%> (ø)
...inot/server/api/resources/HealthCheckResource.java 0.00% <0.00%> (ø)
...r/helix/SegmentOnlineOfflineStateModelFactory.java 56.07% <0.00%> (ø)
... and 751 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@vvivekiyer vvivekiyer left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for fixing.

} while (FORWARD_INDEX_DISABLED_RAW_COLUMNS.contains(col1));
indexLoadingConfig.getNoDictionaryColumns().remove(col1);
String col2 = _noDictionaryColumns.get(rand.nextInt(_noDictionaryColumns.size()));
String col2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also ensure col2 is different from col1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, done

@somandal somandal requested a review from Jackie-Jiang March 2, 2023 02:32
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the quick fix

@Jackie-Jiang Jackie-Jiang merged commit 398b7f5 into apache:master Mar 2, 2023
@somandal somandal deleted the test-fix branch March 2, 2023 18:47
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