-
Notifications
You must be signed in to change notification settings - Fork 907
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
[improve] Add num not adhering placement ledgers replicated metric for ReplicationWorker #3652
[improve] Add num not adhering placement ledgers replicated metric for ReplicationWorker #3652
Conversation
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.
Overall look good to me. Just need a test.
@@ -1262,6 +1268,9 @@ protected EnsemblePlacementPolicy initializeEnsemblePlacementPolicy(ClientConfig | |||
assertNull(stat1); | |||
}); | |||
|
|||
assertTrue("NUM_NOT_ADHERING_PLACEMENT_LEDGERS_REPLICATED", |
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.
Please add a new test to make sure the number is increased as expected.
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.
Good suggestion. I found a bug about numLedgersReplicated update. I have submit another PR #3654 to fix it. PTAL. I will update this PR when that PR is merged.
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.
+1
@horizonzy Please help take a look at this PR, thanks. |
Fine |
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.
Overall LTGM, thanks for your contribution.
@@ -1262,6 +1268,9 @@ protected EnsemblePlacementPolicy initializeEnsemblePlacementPolicy(ClientConfig | |||
assertNull(stat1); | |||
}); | |||
|
|||
assertTrue("NUM_NOT_ADHERING_PLACEMENT_LEDGERS_REPLICATED", |
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.
+1
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.
LGTM.
### Motivation When I want to add num not adhering placement ledgers replicated metric for RW(#3652), I found the numLedgersReplicated statistic to be inaccurate. When we could not find a target bookie to replicate the ledger, the numLedgersReplicated metric will still increase. ![image](https://user-images.githubusercontent.com/35599757/202638656-58f974f6-9ffc-4cfe-9ac7-85962f941de7.png)
Codecov Report
@@ Coverage Diff @@
## master #3652 +/- ##
============================================
- Coverage 68.32% 59.81% -8.51%
+ Complexity 6753 5947 -806
============================================
Files 473 473
Lines 40972 40979 +7
Branches 5241 5243 +2
============================================
- Hits 27993 24511 -3482
- Misses 10720 14341 +3621
+ Partials 2259 2127 -132
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
rerun failure checks |
1 similar comment
rerun failure checks |
Hi, @zymap @hangc0276 I have updated this PR. Could you help take a look? Thanks. |
### Motivation When I want to add num not adhering placement ledgers replicated metric for RW(apache#3652), I found the numLedgersReplicated statistic to be inaccurate. When we could not find a target bookie to replicate the ledger, the numLedgersReplicated metric will still increase. ![image](https://user-images.githubusercontent.com/35599757/202638656-58f974f6-9ffc-4cfe-9ac7-85962f941de7.png)
…ionWorker (apache#3652) ### Motivation We have `NUM_FULL_OR_PARTIAL_LEDGERS_REPLICATED` in `ReplicationWorker`, which includes both `DATA_LOSS` and `DATA_NOT_ADHERING_PLACEMENT` data repair types. It is meaningful to add `NUM_NOT_ADHERING_PLACEMENT_LEDGERS_REPLICATED` metric for `DATA_NOT_ADHERING_PLACEMENT` type separately.
Motivation
We have
NUM_FULL_OR_PARTIAL_LEDGERS_REPLICATED
inReplicationWorker
, which includes bothDATA_LOSS
andDATA_NOT_ADHERING_PLACEMENT
data repair types. It is meaningful to addNUM_NOT_ADHERING_PLACEMENT_LEDGERS_REPLICATED
metric forDATA_NOT_ADHERING_PLACEMENT
type separately.