mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Deprecate Broker::congestion_queue_size and stop using it internally
Since a reorg in the Broker library (commit b04195183) that revamped flow
control and that we pulled in with Zeek 5.0, this setting hasn't done
anything. Broker's endpoint::make_subscriber() and
endpoint::make_status_subscriber() take a queue size argument (with a default
value) that simply gets dropped in the eventual subscriber::make() call. See:
b041951835 (diff-5c0d2baa7981caeb6a4080708ddca6ad929746d10c73d66598e46d7c2c03c8deL34-R178)
This commit is contained in:
parent
c1a5f70df8
commit
5008f586ea
2 changed files with 4 additions and 7 deletions
|
@ -72,7 +72,7 @@ export {
|
||||||
## The number of buffered messages at the Broker/CAF layer after which
|
## The number of buffered messages at the Broker/CAF layer after which
|
||||||
## a subscriber considers themselves congested (i.e. tune the congestion
|
## a subscriber considers themselves congested (i.e. tune the congestion
|
||||||
## control mechanisms).
|
## control mechanisms).
|
||||||
const congestion_queue_size = 200 &redef;
|
const congestion_queue_size = 200 &redef &deprecated="Remove in v8.1. Non-functional since v5.0";
|
||||||
|
|
||||||
## The max number of log entries per log stream to batch together when
|
## The max number of log entries per log stream to batch together when
|
||||||
## sending log messages to a remote logger.
|
## sending log messages to a remote logger.
|
||||||
|
|
|
@ -404,11 +404,9 @@ class BrokerState {
|
||||||
public:
|
public:
|
||||||
using LogSeverityLevel = Observer::LogSeverityLevel;
|
using LogSeverityLevel = Observer::LogSeverityLevel;
|
||||||
|
|
||||||
BrokerState(broker::configuration config, size_t congestion_queue_size, LoggerQueuePtr queue,
|
BrokerState(broker::configuration config, LoggerQueuePtr queue, PeerBufferStatePtr pbstate)
|
||||||
PeerBufferStatePtr pbstate)
|
|
||||||
: endpoint(std::move(config), telemetry_mgr->GetRegistry()),
|
: endpoint(std::move(config), telemetry_mgr->GetRegistry()),
|
||||||
subscriber(
|
subscriber(endpoint.make_subscriber({broker::topic::statuses(), broker::topic::errors()})),
|
||||||
endpoint.make_subscriber({broker::topic::statuses(), broker::topic::errors()}, congestion_queue_size)),
|
|
||||||
loggerQueue(std::move(queue)),
|
loggerQueue(std::move(queue)),
|
||||||
peerBufferState(std::move(pbstate)) {
|
peerBufferState(std::move(pbstate)) {
|
||||||
peerBufferState->SetEndpoint(&endpoint);
|
peerBufferState->SetEndpoint(&endpoint);
|
||||||
|
@ -594,8 +592,7 @@ void Manager::DoInitPostScript() {
|
||||||
auto observer = std::make_shared<Observer>(adapterVerbosity, queue, pbstate);
|
auto observer = std::make_shared<Observer>(adapterVerbosity, queue, pbstate);
|
||||||
broker::logger(observer); // *must* be called before creating the BrokerState
|
broker::logger(observer); // *must* be called before creating the BrokerState
|
||||||
|
|
||||||
auto cqs = get_option("Broker::congestion_queue_size")->AsCount();
|
bstate = std::make_shared<BrokerState>(std::move(config), queue, pbstate);
|
||||||
bstate = std::make_shared<BrokerState>(std::move(config), cqs, queue, pbstate);
|
|
||||||
bstate->logSeverity = static_cast<BrokerSeverityLevel>(logSeverityVal);
|
bstate->logSeverity = static_cast<BrokerSeverityLevel>(logSeverityVal);
|
||||||
bstate->stderrSeverity = static_cast<BrokerSeverityLevel>(stderrSeverityVal);
|
bstate->stderrSeverity = static_cast<BrokerSeverityLevel>(stderrSeverityVal);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue