aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/vespa/storage/persistence/filestorage
diff options
context:
space:
mode:
Diffstat (limited to 'storage/src/vespa/storage/persistence/filestorage')
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/CMakeLists.txt2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/active_operations_stats.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/active_operations_stats.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/debugverifications.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandler.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandler.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp13
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp38
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormanager.h26
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestormetrics.h5
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/mergestatus.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/mergestatus.h2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.cpp15
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h12
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.cpp2
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.h2
24 files changed, 61 insertions, 84 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/CMakeLists.txt b/storage/src/vespa/storage/persistence/filestorage/CMakeLists.txt
index 2d137f87118..15db6297723 100644
--- a/storage/src/vespa/storage/persistence/filestorage/CMakeLists.txt
+++ b/storage/src/vespa/storage/persistence/filestorage/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+# Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
vespa_add_library(storage_filestorpersistence OBJECT
SOURCES
active_operations_metrics.cpp
diff --git a/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp b/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp
index b48ef5bf463..408f0ce7b70 100644
--- a/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "active_operations_metrics.h"
diff --git a/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.h b/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.h
index 94856d70f9e..776fe879198 100644
--- a/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.h
+++ b/storage/src/vespa/storage/persistence/filestorage/active_operations_metrics.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
diff --git a/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.cpp b/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.cpp
index bd7468971d4..7e4f73d61a6 100644
--- a/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "active_operations_stats.h"
diff --git a/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.h b/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.h
index bdf4e87b1f5..ea77baa0ba1 100644
--- a/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.h
+++ b/storage/src/vespa/storage/persistence/filestorage/active_operations_stats.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
diff --git a/storage/src/vespa/storage/persistence/filestorage/debugverifications.h b/storage/src/vespa/storage/persistence/filestorage/debugverifications.h
index d35e59322d5..9c890dad294 100644
--- a/storage/src/vespa/storage/persistence/filestorage/debugverifications.h
+++ b/storage/src/vespa/storage/persistence/filestorage/debugverifications.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* @class storage::DebugVerifications
* @ingroup filestorage
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.cpp
index c066277ec71..a89b705de1b 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "filestorhandler.h"
namespace storage {
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h
index 6d8cdc16743..68b8411c762 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandler.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* \class storage::FileStorHandler
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 45bcd6a98b5..1984d44652a 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "filestorhandlerimpl.h"
#include "filestormetrics.h"
@@ -14,7 +14,6 @@
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/util/string_escape.h>
-#include <xxhash.h>
#include <vespa/log/log.h>
LOG_SETUP(".persistence.filestor.handler.impl");
@@ -896,8 +895,7 @@ FileStorHandlerImpl::flush()
uint64_t
FileStorHandlerImpl::dispersed_bucket_bits(const document::Bucket& bucket) noexcept {
- const uint64_t raw_id = bucket.getBucketId().getId();
- return XXH3_64bits(&raw_id, sizeof(uint64_t));
+ return vespalib::xxhash::xxh3_64(bucket.getBucketId().getId());
}
FileStorHandlerImpl::Stripe::Stripe(const FileStorHandlerImpl & owner, MessageSender & messageSender)
@@ -1129,7 +1127,7 @@ FileStorHandlerImpl::Stripe::flush()
namespace {
bool
-message_type_is_merge_related(api::MessageType::Id msg_type_id) {
+message_type_is_merge_related(api::MessageType::Id msg_type_id) noexcept {
switch (msg_type_id) {
case api::MessageType::MERGEBUCKET_ID:
case api::MessageType::MERGEBUCKET_REPLY_ID:
@@ -1137,6 +1135,11 @@ message_type_is_merge_related(api::MessageType::Id msg_type_id) {
case api::MessageType::GETBUCKETDIFF_REPLY_ID:
case api::MessageType::APPLYBUCKETDIFF_ID:
case api::MessageType::APPLYBUCKETDIFF_REPLY_ID:
+ // DeleteBucket is usually (but not necessarily) executed in the context of a higher-level
+ // merge operation, but we include it here since we want to enforce that not all threads
+ // in a stripe can dispatch a bucket delete at the same time. This also provides a strict
+ // upper bound on the number of in-flight bucket deletes in the persistence core.
+ case api::MessageType::DELETEBUCKET_ID:
return true;
default: return false;
}
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
index 91b8dbe2f13..f7c9b218779 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* \class storage::FileStorHandlerImpl
* \ingroup storage
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
index 777b9a93be6..e6cd8987c0a 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "filestormanager.h"
#include "filestorhandlerimpl.h"
@@ -62,7 +62,7 @@ private:
}
FileStorManager::
-FileStorManager(const config::ConfigUri & configUri, spi::PersistenceProvider& provider,
+FileStorManager(const StorFilestorConfig& bootstrap_config, spi::PersistenceProvider& provider,
ServiceLayerComponentRegister& compReg, DoneInitializeHandler& init_handler,
HostInfo& hostInfoReporterRegistrar)
: StorageLinkQueued("File store manager", compReg),
@@ -75,13 +75,8 @@ FileStorManager(const config::ConfigUri & configUri, spi::PersistenceProvider& p
_persistenceHandlers(),
_threads(),
_bucketOwnershipNotifier(std::make_unique<BucketOwnershipNotifier>(_component, *this)),
- _configFetcher(std::make_unique<config::ConfigFetcher>(configUri.getContext())),
_use_async_message_handling_on_schedule(false),
_metrics(std::make_unique<FileStorMetrics>()),
- _mem_trap_1(std::make_unique<vespalib::HeapMemoryTrap>(1)),
- _mem_trap_2(std::make_unique<vespalib::HeapMemoryTrap>(2)),
- _mem_trap_3(std::make_unique<vespalib::HeapMemoryTrap>(3)),
- _mem_trap_4(std::make_unique<vespalib::HeapMemoryTrap>(16)),
_filestorHandler(),
_sequencedExecutor(),
_closed(false),
@@ -89,8 +84,7 @@ FileStorManager(const config::ConfigUri & configUri, spi::PersistenceProvider& p
_host_info_reporter(_component.getStateUpdater()),
_resource_usage_listener_registration(provider.register_resource_usage_listener(_host_info_reporter))
{
- _configFetcher->subscribe(configUri.getConfigId(), this);
- _configFetcher->start();
+ on_configure(bootstrap_config);
_component.registerMetric(*_metrics);
_component.registerStatusPage(*this);
_component.getStateUpdater().addStateListener(*this);
@@ -176,7 +170,7 @@ dynamic_throttle_params_from_config(const StorFilestorConfig& config, uint32_t n
#define TLS_LINKAGE __attribute__((visibility("hidden"), tls_model("local-exec")))
#endif
-thread_local PersistenceHandler * _G_threadLocalHandler TLS_LINKAGE = nullptr;
+thread_local PersistenceHandler * _g_threadLocalHandler TLS_LINKAGE = nullptr;
size_t
computeAllPossibleHandlerThreads(const vespa::config::content::StorFilestorConfig & cfg) {
@@ -204,26 +198,26 @@ FileStorManager::createRegisteredHandler(const ServiceLayerComponent & component
PersistenceHandler &
FileStorManager::getThreadLocalHandler() {
- if (_G_threadLocalHandler == nullptr) {
- _G_threadLocalHandler = & createRegisteredHandler(_component);
+ if (_g_threadLocalHandler == nullptr) {
+ _g_threadLocalHandler = & createRegisteredHandler(_component);
}
- return *_G_threadLocalHandler;
+ return *_g_threadLocalHandler;
}
void
-FileStorManager::configure(std::unique_ptr<StorFilestorConfig> config)
+FileStorManager::on_configure(const StorFilestorConfig& config)
{
// If true, this is not the first configure.
const bool liveUpdate = ! _threads.empty();
- _use_async_message_handling_on_schedule = config->useAsyncMessageHandlingOnSchedule;
- _host_info_reporter.set_noise_level(config->resourceUsageReporterNoiseLevel);
- const bool use_dynamic_throttling = ((config->asyncOperationThrottlerType == StorFilestorConfig::AsyncOperationThrottlerType::DYNAMIC) ||
- (config->asyncOperationThrottler.type == StorFilestorConfig::AsyncOperationThrottler::Type::DYNAMIC));
- const bool throttle_merge_feed_ops = config->asyncOperationThrottler.throttleIndividualMergeFeedOps;
+ _use_async_message_handling_on_schedule = config.useAsyncMessageHandlingOnSchedule;
+ _host_info_reporter.set_noise_level(config.resourceUsageReporterNoiseLevel);
+ const bool use_dynamic_throttling = ((config.asyncOperationThrottlerType == StorFilestorConfig::AsyncOperationThrottlerType::DYNAMIC) ||
+ (config.asyncOperationThrottler.type == StorFilestorConfig::AsyncOperationThrottler::Type::DYNAMIC));
+ const bool throttle_merge_feed_ops = config.asyncOperationThrottler.throttleIndividualMergeFeedOps;
if (!liveUpdate) {
- _config = std::move(config);
+ _config = std::make_unique<StorFilestorConfig>(config);
uint32_t numThreads = std::max(1, _config->numThreads);
uint32_t numStripes = std::max(1u, numThreads / 2);
_metrics->initDiskMetrics(numStripes, computeAllPossibleHandlerThreads(*_config));
@@ -244,7 +238,7 @@ FileStorManager::configure(std::unique_ptr<StorFilestorConfig> config)
_bucketExecutorRegistration = _provider->register_executor(std::make_shared<BucketExecutorWrapper>(*this));
} else {
assert(_filestorHandler);
- auto updated_dyn_throttle_params = dynamic_throttle_params_from_config(*config, _threads.size());
+ auto updated_dyn_throttle_params = dynamic_throttle_params_from_config(config, _threads.size());
_filestorHandler->reconfigure_dynamic_throttler(updated_dyn_throttle_params);
}
// TODO remove once desired dynamic throttling behavior is set in stone
@@ -832,8 +826,6 @@ void FileStorManager::onClose()
LOG(debug, "Start closing");
_bucketExecutorRegistration.reset();
_resource_usage_listener_registration.reset();
- // Avoid getting config during shutdown
- _configFetcher->close();
LOG(debug, "Closed _configFetcher.");
_filestorHandler->close();
LOG(debug, "Closed _filestorHandler.");
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormanager.h b/storage/src/vespa/storage/persistence/filestorage/filestormanager.h
index cf004c58820..96cff8dfeee 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormanager.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormanager.h
@@ -1,10 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-/**
- * @class storage::FileStorManager
- * @ingroup filestorage
- *
- * @version $Id$
- */
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
@@ -20,10 +14,11 @@
#include <vespa/storage/common/storagelinkqueued.h>
#include <vespa/config-stor-filestor.h>
#include <vespa/storage/persistence/diskthread.h>
+
#include <vespa/storage/common/nodestateupdater.h>
#include <vespa/storageframework/generic/status/htmlstatusreporter.h>
+
#include <vespa/config/helper/ifetchercallback.h>
-#include <vespa/vespalib/util/memory_trap.h>
namespace config {
class ConfigUri;
@@ -41,7 +36,6 @@ namespace spi { struct PersistenceProvider; }
class ContentBucketSpace;
struct FileStorManagerTest;
-class ReadBucketList;
class BucketOwnershipNotifier;
class AbortBucketOperationsCommand;
struct DoneInitializeHandler;
@@ -53,10 +47,11 @@ class ProviderErrorWrapper;
class FileStorManager : public StorageLinkQueued,
public framework::HtmlStatusReporter,
public StateListener,
- private config::IFetcherCallback<vespa::config::content::StorFilestorConfig>,
public MessageSender,
public spi::BucketExecutor
{
+ using StorFilestorConfig = vespa::config::content::StorFilestorConfig;
+
ServiceLayerComponentRegister & _compReg;
ServiceLayerComponent _component;
std::unique_ptr<spi::PersistenceProvider> _provider;
@@ -68,14 +63,8 @@ class FileStorManager : public StorageLinkQueued,
std::unique_ptr<BucketOwnershipNotifier> _bucketOwnershipNotifier;
std::unique_ptr<vespa::config::content::StorFilestorConfig> _config;
- std::unique_ptr<config::ConfigFetcher> _configFetcher;
bool _use_async_message_handling_on_schedule;
std::shared_ptr<FileStorMetrics> _metrics;
- // Spray&pray over a few different size classes
- std::unique_ptr<vespalib::HeapMemoryTrap> _mem_trap_1;
- std::unique_ptr<vespalib::HeapMemoryTrap> _mem_trap_2;
- std::unique_ptr<vespalib::HeapMemoryTrap> _mem_trap_3;
- std::unique_ptr<vespalib::HeapMemoryTrap> _mem_trap_4;
std::unique_ptr<FileStorHandler> _filestorHandler;
std::unique_ptr<vespalib::ISequencedTaskExecutor> _sequencedExecutor;
@@ -86,7 +75,7 @@ class FileStorManager : public StorageLinkQueued,
std::unique_ptr<vespalib::IDestructorCallback> _resource_usage_listener_registration;
public:
- FileStorManager(const config::ConfigUri &, spi::PersistenceProvider&,
+ FileStorManager(const StorFilestorConfig&, spi::PersistenceProvider&,
ServiceLayerComponentRegister&, DoneInitializeHandler&, HostInfo&);
FileStorManager(const FileStorManager &) = delete;
FileStorManager& operator=(const FileStorManager &) = delete;
@@ -122,8 +111,9 @@ public:
const FileStorMetrics& get_metrics() const { return *_metrics; }
+ void on_configure(const vespa::config::content::StorFilestorConfig& config);
+
private:
- void configure(std::unique_ptr<vespa::config::content::StorFilestorConfig> config) override;
PersistenceHandler & createRegisteredHandler(const ServiceLayerComponent & component);
VESPA_DLL_LOCAL PersistenceHandler & getThreadLocalHandler();
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp
index fec64765cad..6072a1dbc3e 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "filestormetrics.h"
#include <vespa/metrics/summetric.hpp>
#include <sstream>
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h
index f7217692a49..85a3813c9eb 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestormetrics.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/**
* @class storage::FileStorMetrics
* @ingroup filestorage
@@ -14,7 +14,6 @@
#include "active_operations_metrics.h"
#include <vespa/metrics/metricset.h>
#include <vespa/metrics/summetric.h>
-#include <vespa/vespalib/util/memory_trap.h>
namespace storage {
@@ -117,11 +116,9 @@ struct FileStorThreadMetrics : public metrics::MetricSet
Op mergeBuckets;
Op getBucketDiff;
Op applyBucketDiff;
- vespalib::InlineMemoryTrap<1> mem_trap_1;
metrics::LongCountMetric getBucketDiffReply;
metrics::LongCountMetric applyBucketDiffReply;
MergeHandlerMetrics merge_handler_metrics;
- vespalib::InlineMemoryTrap<1> mem_trap_2;
FileStorThreadMetrics(const std::string& name, const std::string& desc);
~FileStorThreadMetrics() override;
diff --git a/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.cpp b/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.cpp
index 1b91e6d1fbc..4756f995f03 100644
--- a/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "has_mask_remapper.h"
#include <vespa/vespalib/stllike/hash_map.h>
diff --git a/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.h b/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.h
index 9238f0cb7f0..ec95346c43d 100644
--- a/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.h
+++ b/storage/src/vespa/storage/persistence/filestorage/has_mask_remapper.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/storageapi/message/bucket.h>
diff --git a/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.cpp b/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.cpp
index 4d4b28125f4..c3cb38bd7ac 100644
--- a/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "merge_handler_metrics.h"
#include <vespa/metrics/metricset.h>
diff --git a/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.h b/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.h
index d9404e0ca12..44b85570357 100644
--- a/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.h
+++ b/storage/src/vespa/storage/persistence/filestorage/merge_handler_metrics.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/metrics/valuemetric.h>
diff --git a/storage/src/vespa/storage/persistence/filestorage/mergestatus.cpp b/storage/src/vespa/storage/persistence/filestorage/mergestatus.cpp
index a75eda5b1a4..74d1dfcd0bd 100644
--- a/storage/src/vespa/storage/persistence/filestorage/mergestatus.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/mergestatus.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "mergestatus.h"
#include "has_mask_remapper.h"
diff --git a/storage/src/vespa/storage/persistence/filestorage/mergestatus.h b/storage/src/vespa/storage/persistence/filestorage/mergestatus.h
index 1bba743c6e1..180859ac201 100644
--- a/storage/src/vespa/storage/persistence/filestorage/mergestatus.h
+++ b/storage/src/vespa/storage/persistence/filestorage/mergestatus.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/persistence/spi/context.h>
diff --git a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.cpp b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.cpp
index 4d1c1c34e04..9558429bf13 100644
--- a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "modifiedbucketchecker.h"
#include "filestormanager.h"
@@ -46,12 +46,11 @@ ModifiedBucketChecker::BucketIdListResult::reset(document::BucketSpace bucketSpa
ModifiedBucketChecker::ModifiedBucketChecker(
ServiceLayerComponentRegister& compReg,
spi::PersistenceProvider& provider,
- const config::ConfigUri& configUri)
+ const StorServerConfig& bootstrap_config)
: StorageLink("Modified bucket checker"),
_provider(provider),
_component(),
_thread(),
- _configFetcher(std::make_unique<config::ConfigFetcher>(configUri.getContext())),
_monitor(),
_stateLock(),
_bucketSpaces(),
@@ -60,8 +59,7 @@ ModifiedBucketChecker::ModifiedBucketChecker(
_maxPendingChunkSize(100),
_singleThreadMode(false)
{
- _configFetcher->subscribe<vespa::config::content::core::StorServerConfig>(configUri.getConfigId(), this);
- _configFetcher->start();
+ on_configure(bootstrap_config);
std::ostringstream threadName;
threadName << "Modified bucket checker " << static_cast<void*>(this);
@@ -75,15 +73,14 @@ ModifiedBucketChecker::~ModifiedBucketChecker()
}
void
-ModifiedBucketChecker::configure(
- std::unique_ptr<vespa::config::content::core::StorServerConfig> newConfig)
+ModifiedBucketChecker::on_configure(const vespa::config::content::core::StorServerConfig& newConfig)
{
std::lock_guard lock(_stateLock);
- if (newConfig->bucketRecheckingChunkSize < 1) {
+ if (newConfig.bucketRecheckingChunkSize < 1) {
throw config::InvalidConfigException(
"Cannot have bucket rechecking chunk size of less than 1");
}
- _maxPendingChunkSize = newConfig->bucketRecheckingChunkSize;
+ _maxPendingChunkSize = newConfig.bucketRecheckingChunkSize;
}
diff --git a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h
index 53da2b66dc3..9f0111b32f9 100644
--- a/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h
+++ b/storage/src/vespa/storage/persistence/filestorage/modifiedbucketchecker.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/storageframework/generic/thread/runnable.h>
@@ -23,19 +23,18 @@ namespace spi { struct PersistenceProvider; }
class ModifiedBucketChecker
: public StorageLink,
public framework::Runnable,
- public Types,
- private config::IFetcherCallback<
- vespa::config::content::core::StorServerConfig>
+ public Types
{
public:
+ using StorServerConfig = vespa::config::content::core::StorServerConfig;
using UP = std::unique_ptr<ModifiedBucketChecker>;
ModifiedBucketChecker(ServiceLayerComponentRegister& compReg,
spi::PersistenceProvider& provide,
- const config::ConfigUri& configUri);
+ const StorServerConfig& bootstrap_config);
~ModifiedBucketChecker() override;
- void configure(std::unique_ptr<vespa::config::content::core::StorServerConfig>) override;
+ void on_configure(const vespa::config::content::core::StorServerConfig&);
void run(framework::ThreadHandle& thread) override;
bool tick();
@@ -88,7 +87,6 @@ private:
spi::PersistenceProvider & _provider;
ServiceLayerComponent::UP _component;
std::unique_ptr<framework::Thread> _thread;
- std::unique_ptr<config::ConfigFetcher> _configFetcher;
std::mutex _monitor;
std::condition_variable _cond;
std::mutex _stateLock;
diff --git a/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.cpp b/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.cpp
index 658a23c3035..4f0384dfcb0 100644
--- a/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.cpp
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "service_layer_host_info_reporter.h"
#include <vespa/persistence/spi/resource_usage.h>
diff --git a/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.h b/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.h
index 1c254588b8a..5f15c3e66a2 100644
--- a/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.h
+++ b/storage/src/vespa/storage/persistence/filestorage/service_layer_host_info_reporter.h
@@ -1,4 +1,4 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vespa/persistence/spi/resource_usage_listener.h>