diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-02-14 17:01:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-02-14 17:01:58 +0000 |
commit | 66e66d08e509a4eabf394442bcd7e733e228fb25 (patch) | |
tree | e9aa07ff8e2debfc93c5e430377848779b315cd5 /searchcore/src/tests/proton/documentdb/maintenancecontroller | |
parent | 76b1a42ae483ae66a2d1e43ef749f41661754e1c (diff) |
When making callbacks like notifying about new bucket show the gurad that is held.
Then this guard can used instead of possibly making a deadlock if trying to take it yourself.
Diffstat (limited to 'searchcore/src/tests/proton/documentdb/maintenancecontroller')
-rw-r--r-- | searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp index e47dfac90db..a7a8788b478 100644 --- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp +++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp @@ -25,6 +25,7 @@ #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> @@ -98,7 +99,7 @@ class MyDocumentSubDB public: MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const std::shared_ptr<const document::DocumentTypeRepo> &repo, - std::shared_ptr<BucketDBOwner> bucketDB, const DocTypeName &docTypeName); + std::shared_ptr<bucketdb::BucketDBOwner> bucketDB, const DocTypeName &docTypeName); ~MyDocumentSubDB(); uint32_t getSubDBId() const { return _subDBId; } @@ -131,7 +132,7 @@ public: }; MyDocumentSubDB::MyDocumentSubDB(uint32_t subDBId, SubDbType subDbType, const std::shared_ptr<const document::DocumentTypeRepo> &repo, - std::shared_ptr<BucketDBOwner> bucketDB, const DocTypeName &docTypeName) + std::shared_ptr<bucketdb::BucketDBOwner> bucketDB, const DocTypeName &docTypeName) : _docs(), _subDBId(subDBId), _metaStoreSP(std::make_shared<DocumentMetaStore>( @@ -365,7 +366,7 @@ public: DummyBucketExecutor _bucketExecutor; DocTypeName _docTypeName; test::UserDocumentsBuilder _builder; - std::shared_ptr<BucketDBOwner> _bucketDB; + std::shared_ptr<bucketdb::BucketDBOwner> _bucketDB; test::BucketStateCalculator::SP _calc; test::ClusterStateHandler _clusterStateHandler; test::BucketHandler _bucketHandler; @@ -785,7 +786,7 @@ MaintenanceControllerFixture::MaintenanceControllerFixture() _bucketExecutor(2), _docTypeName("searchdocument"), // must match document builder _builder(), - _bucketDB(std::make_shared<BucketDBOwner>()), + _bucketDB(std::make_shared<bucketdb::BucketDBOwner>()), _calc(new test::BucketStateCalculator()), _clusterStateHandler(), _bucketHandler(), |