-
Notifications
You must be signed in to change notification settings - Fork 707
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
Notify telemetry only every second about the tx pool status #6605
base: master
Are you sure you want to change the base?
Conversation
Before this was done for every imported transaction. When a lot of transactions got imported, the import notification channel was filled. The underlying problem was that the `status` call is read locking the `validated_pool` which will be write locked by the internal submitting logic. Thus, the submitting and status reading was interferring which each other.
for the record: #6600 (comment) |
/cmd prdoc --audience node_operator --bump patch |
_ = timer => { | ||
timer = futures_timer::Delay::new(TELEMETRY_INTERVAL).fuse(); | ||
|
||
if !tx_imported { |
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.
I guess we could avoid needless wakeups, by only re-initializing the timer in case a new notification came in. E.g. replace above tx_imported = true;
with:
if !tx_imported {
tx_imported = true;
timer = futures_timer::Delay::new(TELEMETRY_INTERVAL).fuse();
}
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.
Sorry for deleting my previous comments here - I will reformulate them into a question.
future
is not notified into import_notification_stream
, also ready
can be decreased by putting txs into the blocks.
Not sure if there is other place in transaction pool that updates this metric?
Before this was done for every imported transaction. When a lot of transactions got imported, the import notification channel was filled. The underlying problem was that the
status
call is read locking thevalidated_pool
which will be write locked by the internal submitting logic. Thus, the submitting and status reading was interferring which each other.