summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-05-13 15:01:30 +0100
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-05-13 15:01:30 +0100
commit868446ad4d8ba33053b048dd4d82b6d4f5328f07 (patch)
treeba8a8ecdb32c42f0d9c938965590f220cab7ee20
parent4739bb6a1565e69492eb0349298d86d4d0daad38 (diff)
downloadwebstat-868446ad4d8ba33053b048dd4d82b6d4f5328f07.tar.bz2
webstat-868446ad4d8ba33053b048dd4d82b6d4f5328f07.tar.xz
webstat-868446ad4d8ba33053b048dd4d82b6d4f5328f07.zip
Remove maxBatches
It's not required; DB insertion occurs only in a background thread now.
-rw-r--r--src/ingestor.cpp3
-rw-r--r--src/ingestor.hpp1
-rw-r--r--src/webstat_logger_main.cpp2
3 files changed, 1 insertions, 5 deletions
diff --git a/src/ingestor.cpp b/src/ingestor.cpp
index 88bea9f..2c59866 100644
--- a/src/ingestor.cpp
+++ b/src/ingestor.cpp
@@ -316,8 +316,7 @@ namespace WebStat {
{
auto storedEnd = processingLines.begin();
try {
- for (auto batch : processingLines | std::views::chunk(settings.maxBatchSize)
- | std::views::take(settings.maxBatches)) {
+ for (auto batch : processingLines | std::views::chunk(settings.maxBatchSize)) {
ingestLogLines(dbpool->get().get(), batch);
storedEnd = batch.end();
}
diff --git a/src/ingestor.hpp b/src/ingestor.hpp
index 1125692..738357b 100644
--- a/src/ingestor.hpp
+++ b/src/ingestor.hpp
@@ -26,7 +26,6 @@ namespace WebStat {
unsigned int dbMax = 4;
unsigned int dbKeep = 2;
size_t maxBatchSize = 1;
- size_t maxBatches = 5;
minutes checkJobsAfter = 1min;
minutes freqIngestParkedLines = 30min;
minutes freqPurgeOldLogs = 6h;
diff --git a/src/webstat_logger_main.cpp b/src/webstat_logger_main.cpp
index 04d59fc..1d14532 100644
--- a/src/webstat_logger_main.cpp
+++ b/src/webstat_logger_main.cpp
@@ -69,8 +69,6 @@ main(int argc, char ** argv)
"Number of write/read write DB connections to keep open")
("db.maxBatchSize", po::value(&settings.maxBatchSize)->default_value(settings.maxBatchSize),
"Number of access log entries to hold in memory before starting to write them to the DB")
- ("db.maxBatches", po::value(&settings.maxBatches)->default_value(settings.maxBatches),
- "Maximum number of batches to insert before returning to reading input")
("fallback.dir", po::value(&settings.fallbackDir)->default_value(settings.fallbackDir),
"Path to write access logs to when the database is unavailable")
("jobs.check", po::value(&settings.checkJobsAfter)->default_value(settings.checkJobsAfter),