From 0e841d4acf3ead81716cfe9e053e6e9cb5e4c119 Mon Sep 17 00:00:00 2001 From: Ivan Kozlovic Date: Thu, 14 Apr 2022 17:43:43 -0600 Subject: [PATCH] Tweak ordered consumer flow control and bump to beta.18 Signed-off-by: Ivan Kozlovic --- server/const.go | 2 +- server/consumer.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/const.go b/server/const.go index 02f17738..0781c3b5 100644 --- a/server/const.go +++ b/server/const.go @@ -41,7 +41,7 @@ var ( const ( // VERSION is the current version for the server. - VERSION = "2.8.0-beta.17" + VERSION = "2.8.0-beta.18" // PROTO is the currently supported protocol. // 0 was the original diff --git a/server/consumer.go b/server/consumer.go index 511103a3..71ce6318 100644 --- a/server/consumer.go +++ b/server/consumer.go @@ -295,7 +295,7 @@ const ( JsDeleteWaitTimeDefault = 5 * time.Second // JsFlowControlMaxPending specifies default pending bytes during flow control that can be // outstanding. - JsFlowControlMaxPending = 32 * 1024 * 1024 + JsFlowControlMaxPending = 16 * 1024 * 1024 // JsDefaultMaxAckPending is set for consumers with explicit ack that do not set the max ack pending. JsDefaultMaxAckPending = 1000 ) @@ -3044,7 +3044,7 @@ func (o *consumer) ackReply(sseq, dseq, dc uint64, ts int64, pending uint64) str // Used mostly for testing. Sets max pending bytes for flow control setups. func (o *consumer) setMaxPendingBytes(limit int) { o.pblimit = limit - o.maxpb = limit / 4 + o.maxpb = limit / 16 if o.maxpb == 0 { o.maxpb = 1 }