From 8a0fb20d4ee2270e7a278b4b66483615a3dbdfcf Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Mon, 10 May 2021 09:58:59 +0000 Subject: Obey the max pending maintenance operations. --- .../src/vespa/searchcore/proton/server/pruneremoveddocumentsjob_v2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searchcore') diff --git a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob_v2.cpp b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob_v2.cpp index 0c5b165611e..7bfdaf678b7 100644 --- a/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob_v2.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/pruneremoveddocumentsjob_v2.cpp @@ -94,7 +94,7 @@ PruneRemovedDocumentsJobV2::run() (vespalib::count_us(now.time_since_epoch() - _cfgAgeLimit))); const DocId docIdLimit(_metaStore.getCommittedDocIdLimit()); const DocId lidLimit = std::min(_nextLid + 1000000u, docIdLimit); - for (uint32_t removed = 0; removed < 1000 && _nextLid < lidLimit; _nextLid++) { + for (; ! isBlocked() && _nextLid < lidLimit; _nextLid++) { if ( ! _metaStore.validLid(_nextLid)) continue; const RawDocumentMetaData &meta = _metaStore.getRawMetaData(_nextLid); if (meta.getTimestamp() >= ageLimit) continue; -- cgit v1.2.3