-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Refactor RemoteTranslogTransferTracker.Stats and RemoteSegmentTransferTracker.Stats with Builder pattern #19837
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
base: main
Are you sure you want to change the base?
Refactor RemoteTranslogTransferTracker.Stats and RemoteSegmentTransferTracker.Stats with Builder pattern #19837
Conversation
e85aa3e to
96ffd50
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19837 +/- ##
============================================
- Coverage 73.08% 73.06% -0.03%
+ Complexity 71063 71042 -21
============================================
Files 5754 5754
Lines 325262 325437 +175
Branches 47033 47033
============================================
+ Hits 237732 237791 +59
- Misses 68380 68542 +162
+ Partials 19150 19104 -46 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for refactoring this - let's just fix the version in comments.
server/src/main/java/org/opensearch/index/remote/RemoteTranslogTransferTracker.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Jean Kim <[email protected]>
Signed-off-by: Jean Kim <[email protected]>
Signed-off-by: Jean Kim <[email protected]>
Signed-off-by: Jean Kim <[email protected]>
ce6cdab to
d48903a
Compare
Description
This PR refactors the
RemoteTranslogTransferTracker.StatsandRemoteSegmentTransferTracker.Statsclass to use the Builder pattern instead of relying on multiple constructors.By adopting the Builder pattern, it becomes easier to evolve the stats API, add new metrics, and maintain backward compatibility without forcing disruptive constructor changes.
Based on the related issue:
There are multiple stats-related classes that need similar refactoring, and we are addressing them in priority order. This PR covers
RemoteTranslogTransferTracker.StatsandRemoteSegmentTransferTracker.Statsas part of that effort.Related Issues
Related to #19225
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.