-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 AllocationAwarenessDecider #15856
base: main
Are you sure you want to change the base?
Refactor AllocationAwarenessDecider #15856
Conversation
❌ Gradle check result for f6ffcef: 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? |
@Bukhtawar can you please help take a look? I was going through this piece of code and some of the variable names seemed a bit confusing. If the changes make sense, then i can polish the PR and add all necessary details. I think with this PR, I can also improve the related documentation. |
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 the changes, I'll let @RS146BIJAY give it as pass as well.
f6ffcef
to
57314d4
Compare
❌ Gradle check result for 57314d4: 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? |
.../main/java/org/opensearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java
Show resolved
Hide resolved
.../main/java/org/opensearch/cluster/routing/allocation/decider/AwarenessAllocationDecider.java
Outdated
Show resolved
Hide resolved
❌ Gradle check result for cb1e302: 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? |
Addressed comments Signed-off-by: Smit Patel <patelsmit32123@gmail.com>
cb1e302
to
c6fb23c
Compare
❌ Gradle check result for c6fb23c: 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? |
@RS146BIJAY please review, answered all comments |
@patelsmit32123 Build seems to be breaking. Though I think both add within a loop and addAll should perform same, can we cross validate once how addAll performs vs a single add call on a Set within a loop? |
Signed-off-by: Smit Patel <patelsmit32123@gmail.com>
d2d0bf3
to
30c193b
Compare
❌ Gradle check result for d2d0bf3: 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 ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #15856 +/- ##
============================================
+ Coverage 71.92% 71.95% +0.02%
+ Complexity 64261 64223 -38
============================================
Files 5272 5272
Lines 300538 300536 -2
Branches 43432 43431 -1
============================================
+ Hits 216169 216257 +88
+ Misses 66631 66486 -145
- Partials 17738 17793 +55 ☔ View full report in Codecov by Sentry. |
@RS146BIJAY I ran a simple benchmarking code with 1M entries, the addAll() method seems to be performing better I have also fixed the build |
@sachinpkale can you please review? or @RS146BIJAY please tag a relevant maintainer to review, thanks |
Changes looks ok to me. Adding more folks who can review it. |
@ashking94 @gbbafna please take a look when you can |
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.
@patelsmit32123 The refactoring done makes some of the variable names and method names really long. Also, the meaning does not change much when you are going through the code before and after your change. I would like to know the purpose of this change?
Should we consider adding java doc if it is to understand what the method does?
This PR is stalled because it has been open for 30 days with no activity. |
Description
Refactored AllocationAwarenessDecider class to have more accurate variable/method names
Related Issues
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.