diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-14 21:13:18 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-01-14 21:35:58 +0000 |
commit | 04465fd7fffc974cfdb767f966e92483cac381fb (patch) | |
tree | 3f902f2cc53f17d32b70ff1cff16860fd24d7a45 /searchcore/src | |
parent | cdb9ece95aeae9861ec5aad31c168575919ec346 (diff) |
Move idestructorcallback.h to vespalib module and search::IDestructorCallback to vespalib::IdestructorCallback.
Diffstat (limited to 'searchcore/src')
43 files changed, 78 insertions, 76 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp index 8076e3d05e9..b67eaec1a8d 100644 --- a/searchcore/src/tests/proton/attribute/attribute_test.cpp +++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp @@ -31,7 +31,7 @@ #include <vespa/searchlib/attribute/integerbase.h> #include <vespa/searchlib/attribute/predicate_attribute.h> #include <vespa/searchlib/attribute/singlenumericattribute.hpp> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/searchlib/index/docbuilder.h> #include <vespa/searchlib/index/dummyfileheadercontext.h> #include <vespa/searchlib/predicate/predicate_hash.h> @@ -87,6 +87,7 @@ using vespalib::eval::SimpleValue; using vespalib::eval::TensorSpec; using vespalib::eval::Value; using vespalib::eval::ValueType; +using vespalib::IDestructorCallback; using AVBasicType = search::attribute::BasicType; using AVCollectionType = search::attribute::CollectionType; diff --git a/searchcore/src/tests/proton/docsummary/docsummary.cpp b/searchcore/src/tests/proton/docsummary/docsummary.cpp index 5741a844ded..513b95eb975 100644 --- a/searchcore/src/tests/proton/docsummary/docsummary.cpp +++ b/searchcore/src/tests/proton/docsummary/docsummary.cpp @@ -51,6 +51,7 @@ using namespace search::transactionlog; using namespace search; using namespace std::chrono_literals; +using vespalib::IDestructorCallback; using document::DocumenttypesConfig; using document::test::makeBucketSpace; using search::TuneFileDocumentDB; diff --git a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp index 05ea54606f8..9389a60997d 100644 --- a/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/combiningfeedview/combiningfeedview_test.cpp @@ -4,7 +4,7 @@ #include <vespa/searchcore/proton/feedoperation/operations.h> #include <vespa/searchcore/proton/server/combiningfeedview.h> #include <vespa/searchcore/proton/test/test.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/document/update/documentupdate.h> #include <vespa/vespalib/testkit/testapp.h> @@ -14,7 +14,7 @@ LOG_SETUP("combiningfeedview_test"); using document::DocumentTypeRepo; using document::DocumentUpdate; using document::test::makeBucketSpace; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::SerialNum; using storage::spi::Timestamp; using namespace proton; diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index 06f0ba4109e..1f5382eb68b 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -23,7 +23,7 @@ #include <vespa/searchcore/proton/matching/querylimiter.h> #include <vespa/searchcore/proton/test/test.h> #include <vespa/searchcore/proton/test/thread_utils.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/searchlib/index/docbuilder.h> #include <vespa/searchlib/test/directory_handler.h> #include <vespa/vespalib/test/insertion_operators.h> @@ -46,7 +46,7 @@ using document::test::makeBucketSpace; using proton::bucketdb::BucketDBHandler; using proton::bucketdb::IBucketDBHandler; using proton::bucketdb::IBucketDBHandlerInitializer; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::test::DirectoryHandler; using searchcorespi::IFlushTarget; using searchcorespi::index::IThreadingService; diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp index 35954fbc1b1..0cc9a92895b 100644 --- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp +++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp @@ -31,7 +31,7 @@ using document::test::makeBucketSpace; using proton::bucketdb::BucketCreateNotifier; using search::DocumentIdT; using search::DocumentMetaData; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::index::DocBuilder; using search::index::Schema; using storage::spi::BucketInfo; diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp index 7d75d1a6327..be730a24b87 100644 --- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp @@ -47,7 +47,7 @@ using document::DocumentUpdate; using document::GlobalId; using document::TensorDataType; using document::TensorFieldValue; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::SerialNum; using search::index::schema::CollectionType; using search::index::schema::DataType; diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp index 2b2b8acbc50..bf2265ed9a0 100644 --- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp @@ -36,7 +36,7 @@ using proton::test::MockGidToLidChangeHandler; using search::AttributeVector; using search::CacheStats; using search::DocumentMetaData; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::SearchableStats; using search::index::schema::CollectionType; using search::index::schema::DataType; diff --git a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp index a9058a83af8..4f36608aace 100644 --- a/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp +++ b/searchcore/src/tests/proton/documentdb/lid_space_compaction/lid_space_compaction_test.cpp @@ -8,7 +8,7 @@ #include <vespa/searchcore/proton/test/clusterstatehandler.h> #include <vespa/searchcore/proton/test/disk_mem_usage_notifier.h> #include <vespa/searchcore/proton/test/test.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/searchlib/index/docbuilder.h> #include <vespa/vespalib/gtest/gtest.h> @@ -20,7 +20,7 @@ using namespace proton; using namespace search::index; using namespace search; using namespace vespalib; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using storage::spi::Timestamp; using BlockedReason = IBlockableMaintenanceJob::BlockedReason; using TimePoint = LidUsageStats::TimePoint; diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp index 6bcdea95a5a..2ef479bdcf3 100644 --- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp +++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp @@ -55,7 +55,7 @@ using proton::matching::ISessionCachePruner; using search::AttributeGuard; using search::DocumentIdT; using search::DocumentMetaData; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::SerialNum; using storage::spi::BucketInfo; using storage::spi::Timestamp; diff --git a/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp b/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp index 77150370406..92ec0d6185b 100644 --- a/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp +++ b/searchcore/src/tests/proton/documentdb/move_operation_limiter/move_operation_limiter_test.cpp @@ -29,7 +29,7 @@ struct MyBlockableMaintenanceJob : public IBlockableMaintenanceJob { }; struct Fixture { - using OpsQueue = std::queue<std::shared_ptr<search::IDestructorCallback>>; + using OpsQueue = std::queue<std::shared_ptr<vespalib::IDestructorCallback>>; using MoveOperationLimiterSP = std::shared_ptr<MoveOperationLimiter>; MyBlockableMaintenanceJob job; diff --git a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp index f6d2842accf..3b98206e9cf 100644 --- a/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/storeonlyfeedview/storeonlyfeedview_test.cpp @@ -27,7 +27,7 @@ using document::DocumentUpdate; using document::GlobalId; using namespace proton; using search::DocumentIdT; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::SerialNum; using search::index::DocBuilder; using search::index::Schema; diff --git a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp index cd48256792f..59b1fc80ab0 100644 --- a/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp +++ b/searchcore/src/tests/proton/feed_and_search/feed_and_search.cpp @@ -163,7 +163,7 @@ void Test::requireThatMemoryIndexCanBeDumpedAndSearched() { doc = buildDocument(doc_builder, doc_id2, word2); memory_index.insertDocument(doc_id2, *doc.get()); - memory_index.commit(std::shared_ptr<search::IDestructorCallback>()); + memory_index.commit(std::shared_ptr<vespalib::IDestructorCallback>()); indexFieldWriter->sync(); testSearch(memory_index, word1, doc_id1); diff --git a/searchcore/src/tests/proton/index/fusionrunner_test.cpp b/searchcore/src/tests/proton/index/fusionrunner_test.cpp index 80e6e8b3db8..5243b50eac2 100644 --- a/searchcore/src/tests/proton/index/fusionrunner_test.cpp +++ b/searchcore/src/tests/proton/index/fusionrunner_test.cpp @@ -156,7 +156,7 @@ void addDocument(DocBuilder & doc_builder, MemoryIndex &index, ISourceSelector & uint8_t index_id, uint32_t docid, const string &word) { Document::UP doc = buildDocument(doc_builder, docid, word); index.insertDocument(docid, *doc); - index.commit(std::shared_ptr<search::IDestructorCallback>()); + index.commit(std::shared_ptr<vespalib::IDestructorCallback>()); selector.setSource(docid, index_id); } diff --git a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp index 73919a7c628..a2d08f0121e 100644 --- a/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp +++ b/searchcore/src/tests/proton/index/index_writer/index_writer_test.cpp @@ -1,16 +1,18 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/log/log.h> -LOG_SETUP("index_writer_test"); + #include <vespa/vespalib/testkit/testapp.h> #include <vespa/searchcore/proton/index/index_writer.h> #include <vespa/searchcore/proton/test/mock_index_manager.h> #include <vespa/searchlib/index/docbuilder.h> +#include <vespa/log/log.h> +LOG_SETUP("index_writer_test"); using namespace proton; using namespace search; using namespace search::index; using namespace searchcorespi; +using vespalib::IDestructorCallback; using document::Document; diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp index 5ce4a1e949d..50d23529413 100644 --- a/searchcore/src/tests/proton/index/indexmanager_test.cpp +++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp @@ -94,7 +94,7 @@ Document::UP buildDocument(DocBuilder &doc_builder, int id, return doc_builder.endDocument(); } -std::shared_ptr<search::IDestructorCallback> emptyDestructorCallback; +std::shared_ptr<vespalib::IDestructorCallback> emptyDestructorCallback; struct IndexManagerTest : public ::testing::Test { SerialNum _serial_num; @@ -398,7 +398,7 @@ TEST_F(IndexManagerTest, require_that_flush_stats_are_calculated) Document::UP doc = addDocument(docid); inverter.invertDocument(docid, *doc); invertThreads->sync(); - inverter.pushDocuments(std::shared_ptr<search::IDestructorCallback>()); + inverter.pushDocuments(std::shared_ptr<vespalib::IDestructorCallback>()); pushThreads->sync(); index_size = fic.getMemoryUsage().allocatedBytes() - fixed_index_size; @@ -417,7 +417,7 @@ TEST_F(IndexManagerTest, require_that_flush_stats_are_calculated) doc = addDocument(docid + 100); inverter.invertDocument(docid + 100, *doc); invertThreads->sync(); - inverter.pushDocuments(std::shared_ptr<search::IDestructorCallback>()); + inverter.pushDocuments(std::shared_ptr<vespalib::IDestructorCallback>()); pushThreads->sync(); index_size = fic.getMemoryUsage().allocatedBytes() - fixed_index_size; /// Must account for both docid 0 being reserved and the extra after. diff --git a/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp b/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp index 9d72045c918..9ba6de043be 100644 --- a/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp +++ b/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp @@ -150,7 +150,7 @@ struct Fixture } void notifyPut(GlobalId gid, uint32_t lid, SerialNum serial_num) { - _handler->notifyPut(std::shared_ptr<search::IDestructorCallback>(), gid, lid, serial_num); + _handler->notifyPut(std::shared_ptr<vespalib::IDestructorCallback>(), gid, lid, serial_num); } void notifyRemove(GlobalId gid, SerialNum serialNum) { diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp index 6399c52696c..b1ec2a3996a 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_populator.cpp @@ -2,7 +2,7 @@ #include "attribute_populator.h" #include <vespa/searchcore/proton/common/eventlogger.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/searchlib/common/flush_token.h> #include <vespa/searchlib/common/gatecallback.h> #include <vespa/vespalib/util/gate.h> @@ -11,7 +11,7 @@ #include <vespa/log/log.h> LOG_SETUP(".proton.attribute.attribute_populator"); -using search::IDestructorCallback; +using vespalib::IDestructorCallback; namespace proton { diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp index a691c36097e..2bd84a3f414 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp @@ -10,7 +10,7 @@ #include <vespa/searchcore/proton/attribute/imported_attributes_repo.h> #include <vespa/searchcore/proton/common/attribute_updater.h> #include <vespa/searchlib/attribute/imported_attribute_vector.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/searchlib/tensor/prepare_result.h> #include <vespa/searchcommon/attribute/attribute_utils.h> #include <vespa/vespalib/stllike/hash_map.hpp> @@ -237,7 +237,7 @@ struct BatchUpdateTask : public vespalib::Executor::Task { SerialNum _serialNum; DocumentIdT _lid; AttrUpdates _updates; - search::IDestructorCallback::SP _onWriteDone; + vespalib::IDestructorCallback::SP _onWriteDone; }; BatchUpdateTask::~BatchUpdateTask() = default; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_manager.h b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_manager.h index fa5c52617fd..883fa43dbf4 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_manager.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_manager.h @@ -10,13 +10,12 @@ #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/searchlib/common/serialnum.h> -namespace search { class IDestructorCallback;} - namespace search::attribute { class IAttributeFunctor; } namespace vespalib { class ISequencedTaskExecutor; class ThreadExecutor; + class IDestructorCallback; } namespace proton { @@ -32,7 +31,7 @@ class ImportedAttributesRepo; struct IAttributeManager : public search::IAttributeManager { using SP = std::shared_ptr<IAttributeManager>; - using OnWriteDoneType = const std::shared_ptr<search::IDestructorCallback> &; + using OnWriteDoneType = const std::shared_ptr<vespalib::IDestructorCallback> &; using IAttributeFunctor = search::attribute::IAttributeFunctor; using IConstAttributeFunctor = search::attribute::IConstAttributeFunctor; diff --git a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h index 789a8077cba..c7273d2fe6d 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h @@ -7,7 +7,7 @@ #include <vespa/searchlib/query/base.h> #include <vespa/searchlib/common/serialnum.h> -namespace search { class IDestructorCallback; } +namespace vespalib { class IDestructorCallback; } namespace document { class DocumentUpdate; class Document; @@ -31,7 +31,7 @@ public: typedef search::DocumentIdT DocumentIdT; typedef document::DocumentUpdate DocumentUpdate; typedef document::Document Document; - using OnWriteDoneType = const std::shared_ptr<search::IDestructorCallback> &; + using OnWriteDoneType = const std::shared_ptr<vespalib::IDestructorCallback> &; virtual ~IAttributeWriter() = default; diff --git a/searchcore/src/vespa/searchcore/proton/common/feedtoken.h b/searchcore/src/vespa/searchcore/proton/common/feedtoken.h index 411dd256ccd..7823462fdb8 100644 --- a/searchcore/src/vespa/searchcore/proton/common/feedtoken.h +++ b/searchcore/src/vespa/searchcore/proton/common/feedtoken.h @@ -1,7 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <atomic> namespace storage::spi { class Result; } @@ -26,7 +26,7 @@ public: * This holds the result of the feed operation until it is either failed or acked. * Guarantees that the result is propagated back to the invoker via ITransport interface. */ -class State : public search::IDestructorCallback { +class State : public vespalib::IDestructorCallback { public: State(const State &) = delete; State & operator = (const State &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h b/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h index 5a216486d96..5ca79f1f553 100644 --- a/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h +++ b/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h @@ -2,7 +2,7 @@ #pragma once -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/vespalib/stllike/string.h> namespace document { class GlobalId; } @@ -16,7 +16,7 @@ namespace proton { class IGidToLidChangeListener { public: - using IDestructorCallbackSP = std::shared_ptr<search::IDestructorCallback>; + using IDestructorCallbackSP = std::shared_ptr<vespalib::IDestructorCallback>; virtual ~IGidToLidChangeListener() { } virtual void notifyPutDone(IDestructorCallbackSP context, document::GlobalId gid, uint32_t lid) = 0; virtual void notifyRemove(IDestructorCallbackSP context, document::GlobalId gid) = 0; diff --git a/searchcore/src/vespa/searchcore/proton/reference/pending_gid_to_lid_change.h b/searchcore/src/vespa/searchcore/proton/reference/pending_gid_to_lid_change.h index 1577077a47b..41416e490e8 100644 --- a/searchcore/src/vespa/searchcore/proton/reference/pending_gid_to_lid_change.h +++ b/searchcore/src/vespa/searchcore/proton/reference/pending_gid_to_lid_change.h @@ -2,7 +2,7 @@ #pragma once -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/document/base/globalid.h> #include <vespa/searchlib/common/serialnum.h> @@ -13,7 +13,7 @@ namespace proton { */ class PendingGidToLidChange { - using Context = std::shared_ptr<search::IDestructorCallback>; + using Context = std::shared_ptr<vespalib::IDestructorCallback>; using GlobalId = document::GlobalId; using SerialNum = search::SerialNum; diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp index b3e32beba15..d37c4c84021 100644 --- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.cpp @@ -4,14 +4,14 @@ #include <vespa/document/fieldvalue/document.h> #include <vespa/searchcore/proton/documentmetastore/i_document_meta_store.h> #include <vespa/searchcore/proton/feedoperation/operations.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/log/log.h> LOG_SETUP(".proton.server.combiningfeedview"); using document::DocumentTypeRepo; using document::DocumentId; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; namespace proton { diff --git a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h index 194f64cdfaa..6ae32757073 100644 --- a/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h +++ b/searchcore/src/vespa/searchcore/proton/server/combiningfeedview.h @@ -74,7 +74,7 @@ public: void prepareDeleteBucket(DeleteBucketOperation &delOp) override; void handleDeleteBucket(const DeleteBucketOperation &delOp) override; void prepareMove(MoveOperation &putOp) override; - void handleMove(const MoveOperation &moveOp, std::shared_ptr<search::IDestructorCallback> moveDoneCtx) override; + void handleMove(const MoveOperation &moveOp, std::shared_ptr<vespalib::IDestructorCallback> moveDoneCtx) override; void heartBeat(search::SerialNum serialNum) override; void sync() override; void handlePruneRemovedDocuments(const PruneRemovedDocumentsOperation &pruneOp) override; diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp index be63bea85e4..42310df2531 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_doc_subdb.cpp @@ -313,7 +313,7 @@ FastAccessDocSubDB::onReprocessDone(SerialNum serialNum) { IFeedView::SP feedView = _iFeedView.get(); IAttributeWriter::SP attrWriter = static_cast<FastAccessFeedView &>(*feedView).getAttributeWriter(); - attrWriter->forceCommit(serialNum, std::shared_ptr<search::IDestructorCallback>()); + attrWriter->forceCommit(serialNum, std::shared_ptr<vespalib::IDestructorCallback>()); _writeService.attributeFieldWriter().sync(); _writeService.summary().sync(); Parent::onReprocessDone(serialNum); diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp index 7f9661f9c06..f25d1995439 100644 --- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp @@ -109,7 +109,7 @@ TlsMgrWriter::sync(SerialNum syncTo) throw IllegalStateException(make_string("Failed to sync TLS to token %" PRIu64 ".", syncTo)); } -class OnCommitDone : public search::IDestructorCallback { +class OnCommitDone : public vespalib::IDestructorCallback { public: OnCommitDone(Executor & executor, std::unique_ptr<Executor::Task> task) noexcept : _executor(executor), @@ -746,7 +746,7 @@ FeedHandler::handleOperation(FeedToken token, FeedOperation::UP op) } void -FeedHandler::handleMove(MoveOperation &op, std::shared_ptr<search::IDestructorCallback> moveDoneCtx) +FeedHandler::handleMove(MoveOperation &op, std::shared_ptr<vespalib::IDestructorCallback> moveDoneCtx) { assert(_writeService.master().isCurrentThread()); op.set_prepare_serial_num(inc_prepare_serial_num()); diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.h b/searchcore/src/vespa/searchcore/proton/server/feedhandler.h index eed7367d432..6a014c761cc 100644 --- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.h +++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.h @@ -232,7 +232,7 @@ public: void performOperation(FeedToken token, FeedOperationUP op); void handleOperation(FeedToken token, FeedOperationUP op); - void handleMove(MoveOperation &op, std::shared_ptr<search::IDestructorCallback> moveDoneCtx) override; + void handleMove(MoveOperation &op, std::shared_ptr<vespalib::IDestructorCallback> moveDoneCtx) override; void heartBeat() override; void sync(); diff --git a/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp b/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp index 93bbf709ca2..09caf4db1d6 100644 --- a/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/feedstates.cpp @@ -8,7 +8,7 @@ #include <vespa/searchcore/proton/bucketdb/ibucketdbhandler.h> #include <vespa/searchcore/proton/feedoperation/operations.h> #include <vespa/searchcore/proton/common/eventlogger.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/vespalib/util/closuretask.h> #include <vespa/vespalib/util/lambdatask.h> #include <cassert> @@ -117,7 +117,7 @@ public: _feed_view_ptr->handlePruneRemovedDocuments(op); } void replay(const MoveOperation &op) override { - _feed_view_ptr->handleMove(op, search::IDestructorCallback::SP()); + _feed_view_ptr->handleMove(op, vespalib::IDestructorCallback::SP()); } void replay(const CreateBucketOperation &) override { } diff --git a/searchcore/src/vespa/searchcore/proton/server/forcecommitcontext.h b/searchcore/src/vespa/searchcore/proton/server/forcecommitcontext.h index 73c4ac97f42..9da835ea898 100644 --- a/searchcore/src/vespa/searchcore/proton/server/forcecommitcontext.h +++ b/searchcore/src/vespa/searchcore/proton/server/forcecommitcontext.h @@ -3,7 +3,7 @@ #pragma once #include <vespa/searchcore/proton/common/pendinglidtracker.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> namespace vespalib { class Executor; } @@ -21,9 +21,9 @@ class IPendingGidToLidChanges; * a larger task before dropping the shared pointer, triggering the * callback when all worker threads have completed. */ -class ForceCommitContext : public search::IDestructorCallback +class ForceCommitContext : public vespalib::IDestructorCallback { - using IDestructorCallback = search::IDestructorCallback; + using IDestructorCallback = vespalib::IDestructorCallback; vespalib::Executor &_executor; std::unique_ptr<ForceCommitDoneTask> _task; uint32_t _committedDocIdLimit; diff --git a/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h b/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h index fee5952d790..baf5c3033f9 100644 --- a/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h +++ b/searchcore/src/vespa/searchcore/proton/server/i_lid_space_compaction_handler.h @@ -8,7 +8,7 @@ #include <vespa/searchcore/proton/feedoperation/moveoperation.h> #include <vespa/searchlib/common/lid_usage_stats.h> -namespace search { class IDestructorCallback; } +namespace vespalib { class IDestructorCallback; } namespace proton::documentmetastore { class OperationListener; } @@ -61,12 +61,12 @@ struct ILidSpaceCompactionHandler /** * Performs the actual move operation. */ - virtual void handleMove(const MoveOperation &op, std::shared_ptr<search::IDestructorCallback> moveDoneCtx) = 0; + virtual void handleMove(const MoveOperation &op, std::shared_ptr<vespalib::IDestructorCallback> moveDoneCtx) = 0; /** * Compacts the underlying lid space by starting using the new lid limit. */ - virtual void handleCompactLidSpace(const CompactLidSpaceOperation &op, std::shared_ptr<search::IDestructorCallback> compact_done_context) = 0; + virtual void handleCompactLidSpace(const CompactLidSpaceOperation &op, std::shared_ptr<vespalib::IDestructorCallback> compact_done_context) = 0; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/i_move_operation_limiter.h b/searchcore/src/vespa/searchcore/proton/server/i_move_operation_limiter.h index bcb9616bad7..d9fc426b08a 100644 --- a/searchcore/src/vespa/searchcore/proton/server/i_move_operation_limiter.h +++ b/searchcore/src/vespa/searchcore/proton/server/i_move_operation_limiter.h @@ -3,7 +3,7 @@ #include <memory> -namespace search { class IDestructorCallback; } +namespace vespalib { class IDestructorCallback; } namespace proton { @@ -12,7 +12,7 @@ namespace proton { */ struct IMoveOperationLimiter { virtual ~IMoveOperationLimiter() {} - virtual std::shared_ptr<search::IDestructorCallback> beginOperation() = 0; + virtual std::shared_ptr<vespalib::IDestructorCallback> beginOperation() = 0; }; } diff --git a/searchcore/src/vespa/searchcore/proton/server/idocumentmovehandler.h b/searchcore/src/vespa/searchcore/proton/server/idocumentmovehandler.h index 4d62e488d00..e2faaae3ac9 100644 --- a/searchcore/src/vespa/searchcore/proton/server/idocumentmovehandler.h +++ b/searchcore/src/vespa/searchcore/proton/server/idocumentmovehandler.h @@ -4,7 +4,7 @@ #include <memory> -namespace search { class IDestructorCallback; } +namespace vespalib { class IDestructorCallback; } namespace proton { @@ -15,7 +15,7 @@ class MoveOperation; */ struct IDocumentMoveHandler { - virtual void handleMove(MoveOperation &op, std::shared_ptr<search::IDestructorCallback> moveDoneCtx) = 0; + virtual void handleMove(MoveOperation &op, std::shared_ptr<vespalib::IDestructorCallback> moveDoneCtx) = 0; virtual ~IDocumentMoveHandler() {} }; diff --git a/searchcore/src/vespa/searchcore/proton/server/ifeedview.h b/searchcore/src/vespa/searchcore/proton/server/ifeedview.h index 0fc645fdf78..45efac40d2c 100644 --- a/searchcore/src/vespa/searchcore/proton/server/ifeedview.h +++ b/searchcore/src/vespa/searchcore/proton/server/ifeedview.h @@ -7,7 +7,7 @@ namespace document { class DocumentTypeRepo; } -namespace search { class IDestructorCallback; } +namespace vespalib { class IDestructorCallback; } namespace proton { @@ -29,7 +29,7 @@ protected: IFeedView() = default; public: using SP = std::shared_ptr<IFeedView>; - using DoneCallback = std::shared_ptr<search::IDestructorCallback>; + using DoneCallback = std::shared_ptr<vespalib::IDestructorCallback>; IFeedView(const IFeedView &) = delete; IFeedView & operator = (const IFeedView &) = delete; diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp index b7158afd221..31ff65251bd 100644 --- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.cpp @@ -7,11 +7,11 @@ #include <vespa/searchcore/proton/docsummary/isummarymanager.h> #include <vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h> #include <vespa/searchcore/proton/documentmetastore/operation_listener.h> -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> using document::BucketId; using document::Document; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::LidUsageStats; using storage::spi::Timestamp; diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.h b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.h index faff14d5c35..73d1a324619 100644 --- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.h +++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_handler.h @@ -28,8 +28,8 @@ public: virtual search::LidUsageStats getLidStatus() const override; virtual IDocumentScanIterator::UP getIterator() const override; virtual MoveOperation::UP createMoveOperation(const search::DocumentMetaData &document, uint32_t moveToLid) const override; - virtual void handleMove(const MoveOperation &op, std::shared_ptr<search::IDestructorCallback> doneCtx) override; - virtual void handleCompactLidSpace(const CompactLidSpaceOperation &op, std::shared_ptr<search::IDestructorCallback> compact_done_context) override; + virtual void handleMove(const MoveOperation &op, std::shared_ptr<vespalib::IDestructorCallback> doneCtx) override; + virtual void handleCompactLidSpace(const CompactLidSpaceOperation &op, std::shared_ptr<vespalib::IDestructorCallback> compact_done_context) override; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp index 46d4a3a5974..9ea730b062e 100644 --- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp @@ -59,7 +59,7 @@ LidSpaceCompactionJob::scanDocuments(const LidUsageStats &stats) if ( ! op ) { return false; } - search::IDestructorCallback::SP context = _moveOpsLimiter->beginOperation(); + vespalib::IDestructorCallback::SP context = _moveOpsLimiter->beginOperation(); _opStorer.appendOperation(*op, context); _handler.handleMove(*op, std::move(context)); if (isBlocked(BlockedReason::OUTSTANDING_OPS)) { diff --git a/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.cpp b/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.cpp index c84abb373f8..6e8c878d8c1 100644 --- a/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.cpp @@ -8,7 +8,7 @@ namespace proton { using BlockedReason = IBlockableMaintenanceJob::BlockedReason; -struct MoveOperationLimiter::Callback : public search::IDestructorCallback { +struct MoveOperationLimiter::Callback : public vespalib::IDestructorCallback { MoveOperationLimiter::SP _limiter; Callback(MoveOperationLimiter::SP limiter) noexcept : _limiter(std::move(limiter)) {} virtual ~Callback() { _limiter->endOperation(); } @@ -57,7 +57,7 @@ MoveOperationLimiter::isAboveLimit() const return (_outstandingOps >= _maxOutstandingOps); } -std::shared_ptr<search::IDestructorCallback> +std::shared_ptr<vespalib::IDestructorCallback> MoveOperationLimiter::beginOperation() { LockGuard guard(_mutex); diff --git a/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.h b/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.h index 4e06a257ae2..05b3e5cba0b 100644 --- a/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.h +++ b/searchcore/src/vespa/searchcore/proton/server/move_operation_limiter.h @@ -2,7 +2,7 @@ #pragma once #include "i_move_operation_limiter.h" -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <memory> #include <mutex> @@ -39,7 +39,7 @@ public: ~MoveOperationLimiter(); void clearJob(); bool isAboveLimit() const; - virtual std::shared_ptr<search::IDestructorCallback> beginOperation() override; + virtual std::shared_ptr<vespalib::IDestructorCallback> beginOperation() override; }; } diff --git a/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.h b/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.h index 64644b099a6..e5666daffb6 100644 --- a/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.h +++ b/searchcore/src/vespa/searchcore/proton/server/operationdonecontext.h @@ -2,7 +2,7 @@ #pragma once -#include <vespa/searchlib/common/idestructorcallback.h> +#include <vespa/vespalib/util/idestructorcallback.h> #include <vespa/searchcore/proton/common/feedtoken.h> namespace proton { @@ -14,7 +14,7 @@ namespace proton { * a larger task before dropping the shared pointer, triggering the * ack when all worker threads have completed. */ -class OperationDoneContext : public search::IDestructorCallback +class OperationDoneContext : public vespalib::IDestructorCallback { FeedToken _token; protected: diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp index de5d9d4b644..ae677b4ad6a 100644 --- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp @@ -29,7 +29,7 @@ using document::DocumentId; using document::GlobalId; using document::DocumentTypeRepo; using document::DocumentUpdate; -using search::IDestructorCallback; +using vespalib::IDestructorCallback; using search::SerialNum; using search::index::Schema; using storage::spi::BucketInfoResult; @@ -684,7 +684,7 @@ StoreOnlyFeedView::removeDocuments(const RemoveDocumentsOperation &op, bool remo _metaStore.commit(serialNum, serialNum); explicitReuseLids = _lidReuseDelayer.delayReuse(lidsToRemove); } - std::shared_ptr<search::IDestructorCallback> onWriteDone; + std::shared_ptr<vespalib::IDestructorCallback> onWriteDone; vespalib::Executor::Task::UP removeBatchDoneTask; if (explicitReuseLids) { removeBatchDoneTask = makeLambdaTask([this, lidsToRemove]() { _metaStore.removeBatchComplete(lidsToRemove); }); diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h index 9927c93add4..ea366410030 100644 --- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h +++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.h @@ -22,8 +22,7 @@ #include <future> #include <vespa/searchcore/proton/feedoperation/operations.h> -namespace search { class IDestructorCallback; } - +namespace vespalib { class IDestructorCallback; } namespace proton { @@ -54,7 +53,7 @@ public: using LidVector = LidVectorContext::LidVector; using Document = document::Document; using DocumentUpdate = document::DocumentUpdate; - using OnWriteDoneType =const std::shared_ptr<search::IDestructorCallback> &; + using OnWriteDoneType =const std::shared_ptr<vespalib::IDestructorCallback> &; using OnForceCommitDoneType =const std::shared_ptr<ForceCommitContext> &; using OnOperationDoneType = const std::shared_ptr<OperationDoneContext> &; using OnPutDoneType = const std::shared_ptr<PutDoneContext> &; @@ -181,7 +180,7 @@ private: size_t removeDocuments(const RemoveDocumentsOperation &op, bool remove_index_and_attribute_fields); void internalRemove(FeedToken token, IPendingLidTracker::Token uncommitted, SerialNum serialNum, - Lid lid, std::shared_ptr<search::IDestructorCallback> moveDoneCtx); + Lid lid, std::shared_ptr<vespalib::IDestructorCallback> moveDoneCtx); IPendingLidTracker::Token get_pending_lid_token(const DocumentOperation &op); @@ -233,7 +232,7 @@ public: void prepareDeleteBucket(DeleteBucketOperation &delOp) override; void handleDeleteBucket(const DeleteBucketOperation &delOp) override; void prepareMove(MoveOperation &putOp) override; - void handleMove(const MoveOperation &putOp, std::shared_ptr<search::IDestructorCallback> doneCtx) override; + void handleMove(const MoveOperation &putOp, std::shared_ptr<vespalib::IDestructorCallback> doneCtx) override; void heartBeat(search::SerialNum serialNum) override; void sync() override; void forceCommit(SerialNum serialNum, DoneCallback onDone) override; diff --git a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h index 4ed50177965..381d2fd66ec 100644 --- a/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h +++ b/searchcore/src/vespa/searchcore/proton/test/dummy_feed_view.h @@ -27,7 +27,7 @@ struct DummyFeedView : public IFeedView void prepareDeleteBucket(DeleteBucketOperation &) override {} void handleDeleteBucket(const DeleteBucketOperation &) override {} void prepareMove(MoveOperation &) override {} - void handleMove(const MoveOperation &, std::shared_ptr<search::IDestructorCallback>) override {} + void handleMove(const MoveOperation &, std::shared_ptr<vespalib::IDestructorCallback>) override {} void heartBeat(search::SerialNum) override {} void sync() override {} void handlePruneRemovedDocuments(const PruneRemovedDocumentsOperation &) override {} |