Repository navigation
chore: remove unused SearchIndexPartition helper methods - #36489
Open
detail-app[bot] wants to merge 1 commit into
Open
detail-app[bot] wants to merge 1 commit into
detail-app[bot] wants to merge 1 commit into
Conversation
Contributor
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed the four unused helper methods on
SearchIndexPartition(
getProgressPercent,isComplete,isClaimable,getRemainingCount)and the test cases that exclusively exercised them.
These methods had no production callers — distributed reindexing
production code (JobRecoveryManager, EntityCompletionTracker,
DistributedSearchIndexCoordinator) re-implements the same status/progress
checks inline or via SQL predicates rather than calling these helpers.
Their only consumers were in
SearchIndexPartitionTest, which does notcount as a production consumer. The 22 Lombok-backed fields and the
testToBuildertest are kept since they remain in active use.History
Describe your changes:
Fixes #N/A
I worked on removing dead code from
SearchIndexPartitionbecause the fourhelper methods (
getProgressPercent,isComplete,isClaimable,getRemainingCount) had zero production callers and were only exercisedby tests, which do not count as production consumers.
Type of change:
High-level design:
N/A — small change. Removed four unused helper methods from a single POJO
and the test cases that exclusively tested them. Production behavior is
unchanged since the methods were never called from production code.
Tests:
Use cases covered
testToBuildercontinues to verify Lombokbuilder()/toBuilder()behavior on
SearchIndexPartition(the only test that didn't depend onthe removed helpers).
Unit tests
Lombok-generated builder/toBuilder/getter API (
testToBuilder).openmetadata-service/src/test/java/org/openmetadata/service/apps/bundles/searchIndex/distributed/SearchIndexPartitionTest.javatest still covers the builder pattern used in production.
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
mvn test -pl openmetadata-service -Dtest=SearchIndexPartitionTest:1 test, 0 failures, 0 errors.
UI screen recording:
Not applicable — backend-only dead-code removal, no UI changes.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Tooling: Detail: Dead Code
Dead Code PRs can be configured here.