-
Notifications
You must be signed in to change notification settings - Fork 747
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
ProposerFactory impl Clone #3389
Conversation
I would propose this way :D |
Ok, I manually implemented |
The CI pipeline was cancelled due to failure one of the required jobs. |
include_proof_in_block_size_estimation: self | ||
.include_proof_in_block_size_estimation | ||
.clone(), | ||
_phantom: self._phantom.clone(), |
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.
_phantom: self._phantom.clone(), | |
_phantom: self._phantom, |
|
||
/// Set metrics. | ||
pub fn set_metrics(&mut self, metrics: PrometheusMetrics) { | ||
self.metrics = metrics; | ||
} |
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.
/// Set metrics. | |
pub fn set_metrics(&mut self, metrics: PrometheusMetrics) { | |
self.metrics = metrics; | |
} |
This reverts commit fb10844.
318fed3
In Tanssi, we need a way to stop the collator code and then start it again. This is to support rotating the same collator between different runtimes. Currently, this works very well, except for the proposer metrics, because they only get registered the first time they are started. Afterwards, we see this warning log: > Failed to register proposer prometheus metrics: Duplicate metrics collector registration attempted ~~So this PR adds a method to set metrics, to allow us to register metrics manually before creating the `ProposerFactory`, and then clone the same metrics every time we need to start the collator.~~ Implemented Clone instead
In Tanssi, we need a way to stop the collator code and then start it again. This is to support rotating the same collator between different runtimes. Currently, this works very well, except for the proposer metrics, because they only get registered the first time they are started. Afterwards, we see this warning log: > Failed to register proposer prometheus metrics: Duplicate metrics collector registration attempted ~~So this PR adds a method to set metrics, to allow us to register metrics manually before creating the `ProposerFactory`, and then clone the same metrics every time we need to start the collator.~~ Implemented Clone instead
In Tanssi, we need a way to stop the collator code and then start it again. This is to support rotating the same collator between different runtimes. Currently, this works very well, except for the proposer metrics, because they only get registered the first time they are started. Afterwards, we see this warning log:
So this PR adds a method to set metrics, to allow us to register metrics manually before creating theImplemented Clone insteadProposerFactory
, and then clone the same metrics every time we need to start the collator.