-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Segment Replication] Make SegmentReplicationPressureService a Singleton class and fix bug of rejected_requests reporting incorrect value #7274
Conversation
Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #7274 +/- ##
============================================
- Coverage 70.72% 70.65% -0.08%
+ Complexity 59568 59531 -37
============================================
Files 4862 4862
Lines 285530 285531 +1
Branches 41153 41153
============================================
- Hits 201936 201729 -207
- Misses 66980 67170 +190
- Partials 16614 16632 +18
... and 467 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
(cherry picked from commit 115bb30) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 115bb30) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
This PR makes SegmentReplicationPressureService a Singleton class. This way we will only have one instance of SegmentReplicationPressureService per node.
This PR will resolve the bug of
rejected_requests
column not getting updated in_cat/segment_replication
API.Problem:
-> Initially we were having two instances of SegmentReplicationPressureService. One intstance being used by backpressure mechanism and another instance being used by SegmentReplicationStatsAction class (used by _cat/segment_replication API).
-> As we were having two instances of SegmentReplicationStatsAction class, the changes made by backpressure mechanism are not updated to another instance, so the value of
rejected_requests
is always being 0 and never getting updated.Solution:
-> The solution here would be to make SegmentReplicationStatsAction class a singleton class so that there is only one instance of SegmentReplicationStatsAction class per node and value of
rejected_requests
is always updated correctly.Issues Resolved
#7275
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.