relay.negentropy.enabled config option: set to false to prevent processing negentropy messages

This commit is contained in:
Doug Hoyte
2023-09-22 14:46:17 -04:00
parent c9254adaf8
commit 0d88747613
3 changed files with 8 additions and 0 deletions

View File

@ -52,6 +52,8 @@ void RelayServer::runIngester(ThreadPool<MsgIngester>::Thread &thr) {
sendNoticeError(msg->connId, std::string("bad close: ") + e.what());
}
} else if (cmd.starts_with("NEG-")) {
if (!cfg().relay__negentropy__enabled) throw herr("negentropy disabled");
try {
ingesterProcessNegentropy(txn, decomp, msg->connId, arr);
} catch (std::exception &e) {

View File

@ -95,6 +95,9 @@ config:
default: 2
noReload: true
- name: relay__negentropy__enabled
desc: "Support negentropy protocol messages"
default: true
- name: relay__negentropy__maxSyncEvents
desc: "Maximum records that sync will process before returning an error"
default: 1000000

View File

@ -129,6 +129,9 @@ relay {
}
negentropy {
# Support negentropy protocol messages
enabled = true
# Maximum records that sync will process before returning an error
maxSyncEvents = 1000000
}