-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Refactor Condition.Stats and DirectoryFileTransferTracker.Stats with Builder pattern #19862
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
Refactor Condition.Stats and DirectoryFileTransferTracker.Stats with Builder pattern #19862
Conversation
|
❌ Gradle check result for d34b9e7: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
d34b9e7 to
bdcb3cd
Compare
|
❌ Gradle check result for bdcb3cd: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
bdcb3cd to
0158f39
Compare
|
❌ Gradle check result for 0158f39: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19862 +/- ##
=========================================
Coverage 73.21% 73.22%
+ Complexity 71564 71542 -22
=========================================
Files 5785 5785
Lines 326759 326814 +55
Branches 47291 47291
=========================================
+ Hits 239246 239304 +58
+ Misses 68272 68252 -20
- Partials 19241 19258 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
server/src/main/java/org/opensearch/index/store/DirectoryFileTransferTracker.java
Show resolved
Hide resolved
|
❕ Gradle check result for 82a6b4b: UNSTABLE Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure. |
Signed-off-by: Jean Kim <[email protected]>
Signed-off-by: Jean Kim <[email protected]>
Signed-off-by: Jean Kim <[email protected]>
82a6b4b to
f427ebb
Compare
|
I'll work on the next Stats class once comments are resolved and this PR is merged! |
Signed-off-by: Sandesh Kumar <[email protected]>
|
❌ Gradle check result for 78938ec: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
❌ Gradle check result for 78938ec: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Description
This PR refactors the
Condition.StatsandDirectoryFileTransferTracker.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
Condition.StatsandDirectoryFileTransferTracker.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.