summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2022-01-07 16:10:32 +0000
committerGeir Storli <geirst@yahooinc.com>2022-01-07 16:26:22 +0000
commitb863a115941780fdbd11e891ee58bda2aec3dbf0 (patch)
treef489b9c7d9390ddac01affcf2a0955561cb83c77 /searchcore/src/tests/proton/documentdb
parent8777f096274454993c9a002f4524961a029be84b (diff)
Sample and track the current transient memory usage across all document dbs.
Previously, the transient memory usage was the theoretical worst case needed during loading of attributes. Now, we change this to being a snapshot of the total memory used by all memory indexes. In a simular fashion we plan to track the transient disk usage of all ongoing fusion disk indexes. Eventually, the transient resource usage will be subtracted from the absolute resource usage, before this is reported to the cluster controller in order to decide whether to block feeding. By doing this the transient resource usage is covered by the headroom on the content node, instead of leading to feed blocked due to natural fluctuations.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb')
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index 227e885564d..9657619be40 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -1,14 +1,19 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/config-attributes.h>
+#include <vespa/document/repo/documenttyperepo.h>
+#include <vespa/document/test/make_bucket_space.h>
+#include <vespa/fastos/thread.h>
+#include <vespa/persistence/dummyimpl/dummy_bucket_executor.h>
#include <vespa/searchcore/proton/attribute/attribute_config_inspector.h>
#include <vespa/searchcore/proton/attribute/attribute_usage_filter.h>
#include <vespa/searchcore/proton/attribute/i_attribute_manager.h>
#include <vespa/searchcore/proton/bucketdb/bucket_create_notifier.h>
+#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/common/doctypename.h>
-#include <vespa/searchcore/proton/common/transient_resource_usage_provider.h>
-#include <vespa/searchcore/proton/documentmetastore/operation_listener.h>
#include <vespa/searchcore/proton/documentmetastore/documentmetastore.h>
+#include <vespa/searchcore/proton/documentmetastore/operation_listener.h>
#include <vespa/searchcore/proton/feedoperation/moveoperation.h>
#include <vespa/searchcore/proton/feedoperation/pruneremoveddocumentsoperation.h>
#include <vespa/searchcore/proton/feedoperation/putoperation.h>
@@ -25,14 +30,9 @@
#include <vespa/searchcore/proton/server/maintenancecontroller.h>
#include <vespa/searchcore/proton/test/buckethandler.h>
#include <vespa/searchcore/proton/test/clusterstatehandler.h>
-#include <vespa/searchcore/proton/bucketdb/bucket_db_owner.h>
#include <vespa/searchcore/proton/test/disk_mem_usage_notifier.h>
#include <vespa/searchcore/proton/test/mock_attribute_manager.h>
#include <vespa/searchcore/proton/test/test.h>
-#include <vespa/config-attributes.h>
-#include <vespa/document/repo/documenttyperepo.h>
-#include <vespa/document/test/make_bucket_space.h>
-#include <vespa/persistence/dummyimpl/dummy_bucket_executor.h>
#include <vespa/searchlib/common/idocumentmetastore.h>
#include <vespa/searchlib/index/docbuilder.h>
#include <vespa/vespalib/data/slime/slime.h>
@@ -43,7 +43,6 @@
#include <vespa/vespalib/util/monitored_refcount.h>
#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
-#include <vespa/fastos/thread.h>
#include <unistd.h>
#include <thread>
@@ -824,8 +823,6 @@ MaintenanceControllerFixture::injectMaintenanceJobs()
_bucketCreateNotifier, makeBucketSpace(), _fh, _fh,
_bmc, _clusterStateHandler, _bucketHandler, _calc, _diskMemUsageNotifier,
_jobTrackers, _readyAttributeManager, _notReadyAttributeManager,
- std::make_unique<const AttributeConfigInspector>(AttributesConfigBuilder()),
- std::make_shared<TransientResourceUsageProvider>(),
_attributeUsageFilter);
}
}