From efde6056f6900a590e52fa9459ddc9635eba8a9f Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Wed, 15 Apr 2020 23:27:33 +0200 Subject: [PATCH] Temporarily increase notifications buffer size (#5644) * Temporarily increase notifications buffer size * Add a 511.0 bucket --- .../network/src/protocol/generic_proto/upgrade/notifications.rs | 2 +- substrate/client/network/src/service.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/client/network/src/protocol/generic_proto/upgrade/notifications.rs b/substrate/client/network/src/protocol/generic_proto/upgrade/notifications.rs index f626110a33..cf271016e7 100644 --- a/substrate/client/network/src/protocol/generic_proto/upgrade/notifications.rs +++ b/substrate/client/network/src/protocol/generic_proto/upgrade/notifications.rs @@ -44,7 +44,7 @@ use unsigned_varint::codec::UviBytes; /// Maximum allowed size of the two handshake messages, in bytes. const MAX_HANDSHAKE_SIZE: usize = 1024; /// Maximum number of buffered messages before we refuse to accept more. -const MAX_PENDING_MESSAGES: usize = 256; +const MAX_PENDING_MESSAGES: usize = 512; /// Upgrade that accepts a substream, sends back a status message, then becomes a unidirectional /// stream of messages. diff --git a/substrate/client/network/src/service.rs b/substrate/client/network/src/service.rs index b099a5dabf..049ca4273d 100644 --- a/substrate/client/network/src/service.rs +++ b/substrate/client/network/src/service.rs @@ -937,7 +937,7 @@ impl Metrics { "sub_libp2p_notifications_queues_size", "Total size of all the notification queues" ), - buckets: vec![0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0], + buckets: vec![0.0, 1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0, 256.0, 511.0, 512.0], }, &["protocol"] )?, registry)?,