reduce etl queue size based on number of extractor threads

This commit is contained in:
CJ Cobb
2021-03-25 21:56:03 -04:00
parent d72867ec64
commit 2af6d72d7e

View File

@@ -354,7 +354,7 @@ ReportingETL::runETLPipeline(uint32_t startSequence, int numExtractors)
std::atomic_bool writeConflict = false;
std::optional<uint32_t> lastPublishedSequence;
constexpr uint32_t maxQueueSize = 1000;
uint32_t maxQueueSize = 1000 / numExtractors;
auto begin = std::chrono::system_clock::now();
using QueueType =
ThreadSafeQueue<std::optional<org::xrpl::rpc::v1::GetLedgerResponse>>;