-
Notifications
You must be signed in to change notification settings - Fork 264
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
7296 subnet subscriptions metrics #7411
7296 subnet subscriptions metrics #7411
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.
Correct me if I'm wrong in assumptions.
Say, we have non-persistent subnet subscription at id 9 with unsubscription slot 100. So we have metric non-persistent (9, 1). Next, we get persistent subscription on 90 slot to slot 800, ubsubscription slot will be updated and persistent id will be added to persistent set, but not the metrics. It means next 710 slots it will be displayed as non-persistent. At the end on unsubscription we will find id in persistentId, mark persistent gauge as 0 not touching non-persistent, so metric will remains non-persistent (9, 1) even after unsubscription. So we need something like this:
- check if update is > than current unsubscription, turn off old one and turn on new. It will be not 100% correct but way better
- on persistent unsubscription put 0 in both labels
Also we could add a test for it.
...c/main/java/tech/pegasys/teku/networking/eth2/gossip/subnets/AttestationTopicSubscriber.java
Outdated
Show resolved
Hide resolved
.../beaconchain/src/main/java/tech/pegasys/teku/services/beaconchain/BeaconChainController.java
Outdated
Show resolved
Hide resolved
I added an aggregation (non-persistent) to persistent subnet metrics swap when needed.
The only drawback of this logic is that the aggregation subnet subscription prevail (and that's ok, we should not miss aggregation duties in any case) which could lead to some situations where we only see aggregation subnet subscription for few slots (when the aggregation subnet un-subscription slot > existing persistent subnet un-subscription slot, in that case we replace the persistent subscription by the aggregation ones). |
7fbd078
to
7799954
Compare
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
PR Description
Add subnet subscription metrics:
Fixed Issue(s)
fixes #7341
Documentation
doc-change-required
label to this PR if updates are required.Changelog