diff options
Diffstat (limited to 'storage/src/tests/persistence/common/persistenceproviderwrapper.cpp')
-rw-r--r-- | storage/src/tests/persistence/common/persistenceproviderwrapper.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/src/tests/persistence/common/persistenceproviderwrapper.cpp b/storage/src/tests/persistence/common/persistenceproviderwrapper.cpp index 17bfa57bed8..0740e1d6fec 100644 --- a/storage/src/tests/persistence/common/persistenceproviderwrapper.cpp +++ b/storage/src/tests/persistence/common/persistenceproviderwrapper.cpp @@ -3,6 +3,7 @@ #include "persistenceproviderwrapper.h" #include <vespa/document/fieldvalue/document.h> #include <vespa/document/update/documentupdate.h> +#include <vespa/persistence/spi/doctype_gid_and_timestamp.h> #include <vespa/vespalib/util/idestructorcallback.h> #include <sstream> @@ -117,6 +118,17 @@ PersistenceProviderWrapper::removeAsync(const spi::Bucket& bucket, std::vector< } void +PersistenceProviderWrapper::removeByGidAsync(const spi::Bucket& bucket, std::vector<spi::DocTypeGidAndTimestamp> ids, + std::unique_ptr<spi::OperationComplete> onComplete) +{ + for (const auto & dt_gid_ts : ids) { + LOG_SPI("removeByGid(" << bucket << ", " << dt_gid_ts.timestamp << ", " << dt_gid_ts.doc_type << ", " << dt_gid_ts.gid << ")"); + } + CHECK_ERROR_ASYNC(spi::RemoveResult, FAIL_REMOVE, onComplete); + _spi.removeByGidAsync(bucket, std::move(ids), std::move(onComplete)); +} + +void PersistenceProviderWrapper::removeIfFoundAsync(const spi::Bucket& bucket, spi::Timestamp timestamp, const spi::DocumentId& id, spi::OperationComplete::UP onComplete) { |