aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2020-12-09 10:52:09 +0100
committerTor Egge <Tor.Egge@broadpark.no>2020-12-09 10:57:44 +0100
commitd78f3fb7fdb8fa8ed2e2724b3a3f6bc0881fc733 (patch)
treed9a666371013fd31f3a3931e70114e90c29316e6
parentf5ede0bc8c6caf1e8891290298cc65b9b759f172 (diff)
Remove BucketOperationLogger.
-rw-r--r--storage/src/vespa/storage/common/CMakeLists.txt1
-rw-r--r--storage/src/vespa/storage/common/bucketoperationlogger.cpp330
-rw-r--r--storage/src/vespa/storage/common/bucketoperationlogger.h123
-rw-r--r--storage/src/vespa/storage/distributor/bucketdbupdater.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/distributorcomponent.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/operations/idealstate/splitoperation.cpp21
-rw-r--r--storage/src/vespa/storage/distributor/pending_bucket_space_db_transition.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/pendingclusterstate.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/statecheckers.cpp1
-rw-r--r--storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp7
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp21
-rw-r--r--storage/src/vespa/storage/persistence/simplemessagehandler.cpp3
-rw-r--r--storage/src/vespa/storage/storageserver/statemanager.cpp1
13 files changed, 0 insertions, 512 deletions
diff --git a/storage/src/vespa/storage/common/CMakeLists.txt b/storage/src/vespa/storage/common/CMakeLists.txt
index efbd62a45a0..741d97f78ef 100644
--- a/storage/src/vespa/storage/common/CMakeLists.txt
+++ b/storage/src/vespa/storage/common/CMakeLists.txt
@@ -2,7 +2,6 @@
vespa_add_library(storage_common OBJECT
SOURCES
bucketmessages.cpp
- bucketoperationlogger.cpp
content_bucket_space.cpp
content_bucket_space_repo.cpp
distributorcomponent.cpp
diff --git a/storage/src/vespa/storage/common/bucketoperationlogger.cpp b/storage/src/vespa/storage/common/bucketoperationlogger.cpp
deleted file mode 100644
index 905b704409f..00000000000
--- a/storage/src/vespa/storage/common/bucketoperationlogger.cpp
+++ /dev/null
@@ -1,330 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include "bucketoperationlogger.h"
-#include <vespa/storage/bucketdb/storbucketdb.h>
-#include <vespa/storage/bucketdb/bucketcopy.h>
-
-#include <vespa/storageapi/buckets/bucketinfo.h>
-#include <vespa/storageframework/defaultimplementation/clock/realclock.h>
-#include <vespa/vespalib/util/backtrace.h>
-#include <vespa/vespalib/stllike/asciistream.h>
-
-#ifdef ENABLE_BUCKET_OPERATION_LOGGING
-#include <vespa/log/log.h>
-LOG_SETUP(".debuglogger");
-
-namespace storage {
-
-namespace debug {
-
-BucketOperationLogger opLogger;
-
-void
-BucketOperationLogger::log(const document::BucketId& id,
- const vespalib::string& text,
- bool requireLock,
- State::LockUpdate lockUpdate)
-{
- LogEntry entry;
- framework::defaultimplementation::RealClock rclock;
- entry._frameCount = vespalib::getStackTraceFrames(entry._stackFrames, MAX_STACK_FRAMES);
- entry._text = text;
- entry._timestamp = rclock.getTimeInMicros();
- entry._threadId = FastOS_Thread::GetCurrentThreadId() & 0xffff;
- uint32_t lockedByThread = 0;
- bool hasError = false;
-
- {
- std::lock_guard<std:.mutex> guard(_logLock);
- BucketMapType::iterator i = _bucketMap.lower_bound(id);
- if (i != _bucketMap.end() && i->first == id) {
- if (i->second._history.size() >= MAX_ENTRIES) {
- i->second._history.pop_front();
- }
- i->second._history.push_back(entry);
- if (lockUpdate == State::BUCKET_LOCKED) {
- if (i->second._lockedByThread != 0) {
- LOG(warning, "Attempting to acquire lock, but lock "
- "is already held by thread %u", i->second._lockedByThread);
- hasError = true;
- }
- i->second._lockedByThread = entry._threadId;
- }
- lockedByThread = i->second._lockedByThread;
- if (lockUpdate == State::BUCKET_UNLOCKED) {
- if (i->second._lockedByThread == 0) {
- LOG(warning, "Attempting to release lock, but lock "
- "is not held");
- hasError = true;
- }
- i->second._lockedByThread = 0;
- }
- } else {
- State addState;
- addState._lockedByThread = 0;
- addState._history.push_back(entry);
- if (lockUpdate == State::BUCKET_LOCKED) {
- addState._lockedByThread = entry._threadId;
- } else if (lockUpdate == State::BUCKET_UNLOCKED) {
- LOG(warning, "Attempting to release lock, but lock "
- "is not held");
- hasError = true;
- }
- _bucketMap.insert(i, BucketMapType::value_type(id, addState));
- }
- }
-
- if (requireLock && !lockedByThread) {
- LOG(warning, "Operation '%s' requires lock, but lock is "
- "not registered as held", text.c_str());
- hasError = true;
- }
- if (hasError) {
- LOG(warning, "%s", getHistory(id).c_str());
- }
-}
-
-namespace {
-
-// Must hold logger lock
-template <typename LineHandler>
-void
-processHistory(const BucketOperationLogger& opLogger,
- const document::BucketId& id, LineHandler& handler)
-{
- BucketOperationLogger::BucketMapType::const_iterator i(
- opLogger._bucketMap.find(id));
- if (i == opLogger._bucketMap.end()) {
- vespalib::asciistream ss;
- ss << "No history recorded for bucket '"
- << id.toString() << "'";
- handler(ss.str());
- return;
- }
-
- {
- vespalib::asciistream ss;
- ss << "Showing last " << i->second._history.size() << " operations on "
- << "bucket " << id.toString() << " (newest first):";
- handler(ss.str());
- }
- for (BucketOperationLogger::State::LogEntryListType::const_reverse_iterator j(
- i->second._history.rbegin()), end(i->second._history.rend());
- j != end; ++j)
- {
- vespalib::asciistream ss;
- ss << storage::framework::getTimeString(
- j->_timestamp.getTime(),
- storage::framework::DATETIME_WITH_MICROS)
- << " " << j->_threadId << " "
- << j->_text << ". "
- << vespalib::getStackTrace(1, j->_stackFrames, j->_frameCount);
- handler(ss.str());
- }
-}
-
-struct LogWarnAppender
-{
- void operator()(const vespalib::string& line)
- {
- LOG(warning, "%s", line.c_str());
- }
-};
-
-struct LogStringBuilder
-{
- vespalib::asciistream ss;
- void operator()(const vespalib::string& line)
- {
- ss << line << "\n";
- }
-};
-
-}
-
-void
-BucketOperationLogger::dumpHistoryToLog(const document::BucketId& id) const
-{
- LogWarnAppender handler;
- std::lock_guard<std::mutex> guard(_logLock);
- processHistory(*this, id, handler);
-}
-
-vespalib::string
-BucketOperationLogger::getHistory(const document::BucketId& id) const
-{
- LogStringBuilder handler;
- std::lock_guard<std::mutex> lock(_logLock);
- processHistory(*this, id, handler);
- return handler.ss.str();
-}
-
-vespalib::string
-BucketOperationLogger::searchBucketHistories(
- const vespalib::string& sub,
- const vespalib::string& urlPrefix) const
-{
- vespalib::asciistream ss;
- ss << "<ul>\n";
- // This may block for a while... Assuming such searches run when system
- // is otherwise idle.
- std::lock_guard<std::mutex> guard(_logLock);
- for (BucketMapType::const_iterator
- bIt(_bucketMap.begin()), bEnd(_bucketMap.end());
- bIt != bEnd; ++bIt)
- {
- for (State::LogEntryListType::const_iterator
- sIt(bIt->second._history.begin()),
- sEnd(bIt->second._history.end());
- sIt != sEnd; ++sIt)
- {
- if (sIt->_text.find(sub.c_str()) != vespalib::string::npos) {
- ss << "<li><a href=\"" << urlPrefix
- << "0x" << vespalib::hex << bIt->first.getId()
- << vespalib::dec << "\">" << bIt->first.toString()
- << "</a>:\n";
- ss << sIt->_text << "</li>\n";
- }
- }
- }
- ss << "</ul>\n";
- return ss.str();
-}
-
-BucketOperationLogger&
-BucketOperationLogger::getInstance()
-{
- return opLogger;
-}
-
-// Storage node
-void logBucketDbInsert(uint64_t key, const bucketdb::StorageBucketInfo& entry)
-{
- LOG_BUCKET_OPERATION_NO_LOCK(
- document::BucketId(document::BucketId::keyToBucketId(key)),
- vespalib::make_string(
- "bucketdb insert Bucket(crc=%x, docs=%u, size=%u, "
- "metacount=%u, usedfilesize=%u, ready=%s, "
- "active=%s, lastModified=%zu) disk=%u",
- entry.info.getChecksum(),
- entry.info.getDocumentCount(),
- entry.info.getTotalDocumentSize(),
- entry.info.getMetaCount(),
- entry.info.getUsedFileSize(),
- (entry.info.isReady() ? "true" : "false"),
- (entry.info.isActive() ? "true" : "false"),
- entry.info.getLastModified(),
- entry.disk));
-}
-
-void logBucketDbErase(uint64_t key, const TypeTag<bucketdb::StorageBucketInfo>&)
-{
- LOG_BUCKET_OPERATION_NO_LOCK(
- document::BucketId(document::BucketId::keyToBucketId(key)),
- "bucketdb erase");
-}
-
-// Distributor
-void
-checkAllConsistentNodesImpliesTrusted(
- const document::BucketId& bucket,
- const BucketInfo& entry)
-{
- // If all copies are consistent, they should also be trusted
- if (entry.validAndConsistent() && entry.getNodeCount() > 1) {
- for (std::size_t i = 0; i < entry.getNodeCount(); ++i) {
- const BucketCopy& copy = entry.getNodeRef(i);
- if (copy.trusted() == false) {
- LOG(warning, "Bucket DB entry %s for %s is consistent, but "
- "contains non-trusted copy %s", entry.toString().c_str(),
- bucket.toString().c_str(), copy.toString().c_str());
- DUMP_LOGGED_BUCKET_OPERATIONS(bucket);
- }
- }
- }
-}
-
-std::size_t
-firstTrustedNode(const BucketInfo& entry)
-{
- for (std::size_t i = 0; i < entry.getNodeCount(); ++i) {
- const distributor::BucketCopy& copy = entry.getNodeRef(i);
- if (copy.trusted()) {
- return i;
- }
- }
- return std::numeric_limits<std::size_t>::max();
-}
-
-void
-checkNotInSyncImpliesNotTrusted(
- const document::BucketId& bucket,
- const BucketInfo& entry)
-{
- // If there are copies out of sync, different copies should not
- // be set to trusted
- std::size_t trustedNode = firstTrustedNode(entry);
- if (trustedNode != std::numeric_limits<std::size_t>::max()) {
- // Ensure all other trusted copies match the metadata of the
- // first trusted bucket
- const BucketCopy& trustedCopy = entry.getNodeRef(trustedNode);
- for (std::size_t i = 0; i < entry.getNodeCount(); ++i) {
- if (i == trustedNode) {
- continue;
- }
- const BucketCopy& copy = entry.getNodeRef(i);
- const api::BucketInfo& copyInfo = copy.getBucketInfo();
- const api::BucketInfo& trustedInfo = trustedCopy.getBucketInfo();
- if (copy.trusted()
- && ((copyInfo.getChecksum() != trustedInfo.getChecksum())))
- //|| (copyInfo.getTotalDocumentSize() != trustedInfo.getTotalDocumentSize())))
- {
- LOG(warning, "Bucket DB entry %s for %s has trusted node copy "
- "with differing metadata %s", entry.toString().c_str(),
- bucket.toString().c_str(), copy.toString().c_str());
- DUMP_LOGGED_BUCKET_OPERATIONS(bucket);
- }
- }
- }
-}
-
-void
-checkInvalidImpliesNotTrusted(
- const document::BucketId& bucket,
- const BucketInfo& entry)
-{
- for (std::size_t i = 0; i < entry.getNodeCount(); ++i) {
- const BucketCopy& copy = entry.getNodeRef(i);
- if (!copy.valid() && copy.trusted()) {
- LOG(warning, "Bucket DB entry %s for %s has invalid copy %s "
- "marked as trusted", entry.toString().c_str(),
- bucket.toString().c_str(), copy.toString().c_str());
- DUMP_LOGGED_BUCKET_OPERATIONS(bucket);
- }
- }
-}
-
-void
-logBucketDbInsert(uint64_t key, const BucketInfo& entry)
-{
- document::BucketId bucket(document::BucketId::keyToBucketId(key));
- LOG_BUCKET_OPERATION_NO_LOCK(
- bucket, vespalib::make_string(
- "bucketdb insert of %s", entry.toString().c_str()));
- // Do some sanity checking of the inserted entry
- checkAllConsistentNodesImpliesTrusted(bucket, entry);
- checkNotInSyncImpliesNotTrusted(bucket, entry);
- checkInvalidImpliesNotTrusted(bucket, entry);
-}
-
-void
-logBucketDbErase(uint64_t key, const TypeTag<BucketInfo>&)
-{
- document::BucketId bucket(document::BucketId::keyToBucketId(key));
- LOG_BUCKET_OPERATION_NO_LOCK(bucket, "bucketdb erase");
-}
-
-} // namespace debug
-
-} // namespace storage
-
-#endif // ENABLE_BUCKET_OPERATION_LOGGING
diff --git a/storage/src/vespa/storage/common/bucketoperationlogger.h b/storage/src/vespa/storage/common/bucketoperationlogger.h
deleted file mode 100644
index af4b539a4c8..00000000000
--- a/storage/src/vespa/storage/common/bucketoperationlogger.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#pragma once
-
-#include <vespa/vespalib/stllike/string.h>
-#include <vespa/document/bucket/bucketid.h>
-#include <map>
-#include <list>
-#include <mutex>
-
-/**
- * Enable this to log most slotfile operations (such as all mutations) as
- * well as common bucket operations such as splitting, joining and bucket db
- * updates. Each log entry contains the stack frames for the logging callsite,
- * a timestamp, the ID of the thread performing the operation as well as a
- * message. The stack trace is cheaply acquired and does thus not affect runtime
- * performance to a great degree. Expect some overhead from the logging itself
- * since it requires a global mutex around the log state.
- *
- * All relevant bucket/slotfile operations are checked to ensure that the
- * filestor lock is held during the operation and that the thread performing
- * it is the same as the one that acquired the lock.
- *
- * Similarly, code has been added to distributor bucket database and ideal
- * state handling to log these.
- *
- * In the case of an invariant violation (such as a locking bug), the last
- * BUCKET_OPERATION_LOG_ENTRIES log entries will be dumped to the vespalog.
- * Code may also dump the logged history for a bucket by calling
- * DUMP_LOGGED_BUCKET_OPERATIONS(bucketid)
- */
-//#define ENABLE_BUCKET_OPERATION_LOGGING
-#define BUCKET_OPERATION_LOG_ENTRIES 40
-
-#ifdef ENABLE_BUCKET_OPERATION_LOGGING
-#define LOG_BUCKET_OPERATION_NO_LOCK(bucket, string) \
-debug::BucketOperationLogger::getInstance().log( \
- (bucket), (string), false)
-
-#define LOG_BUCKET_OPERATION(bucket, string) \
-debug::BucketOperationLogger::getInstance().log( \
- (bucket), (string), true)
-
-#define LOG_BUCKET_OPERATION_SPECIFY_LOCKED(bucket, string, require_locked) \
-debug::BucketOperationLogger::getInstance().log( \
- (bucket), (string), (require_locked))
-
-#define LOG_BUCKET_OPERATION_SET_LOCK_STATE(bucket, string, require_locked, new_state) \
-debug::BucketOperationLogger::getInstance().log( \
- (bucket), (string), (require_locked), (new_state))
-
-#define DUMP_LOGGED_BUCKET_OPERATIONS(bucket) \
- debug::BucketOperationLogger::getInstance().dumpHistoryToLog(bucket)
-
-namespace storage {
-
-// Debug stuff for tracking the last n operations to buckets
-namespace debug {
-
-struct BucketOperationLogger
-{
- static const std::size_t MAX_ENTRIES = BUCKET_OPERATION_LOG_ENTRIES;
- static const std::size_t MAX_STACK_FRAMES = 25;
-
- struct LogEntry
- {
- void* _stackFrames[MAX_STACK_FRAMES];
- vespalib::string _text;
- framework::MicroSecTime _timestamp;
- int _frameCount;
- int32_t _threadId;
- };
-
- struct State
- {
- typedef std::list<LogEntry> LogEntryListType;
- enum LockUpdate
- {
- NO_UPDATE = 0,
- BUCKET_LOCKED = 1,
- BUCKET_UNLOCKED = 2
- };
- LogEntryListType _history;
- uint32_t _lockedByThread;
- };
-
- typedef std::map<document::BucketId, State> BucketMapType;
-
- std::mutex _logLock;
- BucketMapType _bucketMap;
-
- void log(const document::BucketId& id,
- const vespalib::string& text,
- bool requireLock = true,
- State::LockUpdate update = State::NO_UPDATE);
-
- vespalib::string getHistory(const document::BucketId& id) const;
- void dumpHistoryToLog(const document::BucketId& id) const;
- //void dumpAllBucketHistoriesToFile(const vespalib::string& filename) const;
- /**
- * Search through all bucket history entry descriptions to find substring,
- * creating a itemized list of buckets containing it as well as a preview.
- * @param sub the exact substring to search for.
- * @param urlPrefix the URL used for creating bucket links.
- */
- vespalib::string searchBucketHistories(const vespalib::string& sub,
- const vespalib::string& urlPrefix) const;
- static BucketOperationLogger& getInstance();
-};
-
-}
-
-}
-
-#else
-
-#define LOG_BUCKET_OPERATION_NO_LOCK(bucket, string)
-#define LOG_BUCKET_OPERATION(bucket, string)
-#define LOG_BUCKET_OPERATION_SPECIFY_LOCKED(bucket, string, require_locked)
-#define DUMP_LOGGED_BUCKET_OPERATIONS(bucket)
-#define LOG_BUCKET_OPERATION_SET_LOCK_STATE(bucket, string, require_locked, new_state)
-
-#endif
-
diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp
index d7fa770ef12..a8c4e7c3544 100644
--- a/storage/src/vespa/storage/distributor/bucketdbupdater.cpp
+++ b/storage/src/vespa/storage/distributor/bucketdbupdater.cpp
@@ -8,7 +8,6 @@
#include "distributormetricsset.h"
#include "simpleclusterinformation.h"
#include <vespa/document/bucket/fixed_bucket_spaces.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/vespalib/util/xmlstream.h>
diff --git a/storage/src/vespa/storage/distributor/distributorcomponent.cpp b/storage/src/vespa/storage/distributor/distributorcomponent.cpp
index dde5281a15f..86c98cc7b78 100644
--- a/storage/src/vespa/storage/distributor/distributorcomponent.cpp
+++ b/storage/src/vespa/storage/distributor/distributorcomponent.cpp
@@ -4,7 +4,6 @@
#include "distributor_bucket_space.h"
#include "pendingmessagetracker.h"
#include <vespa/document/select/parser.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/vdslib/state/cluster_state_bundle.h>
diff --git a/storage/src/vespa/storage/distributor/operations/idealstate/splitoperation.cpp b/storage/src/vespa/storage/distributor/operations/idealstate/splitoperation.cpp
index a74dc1c0d65..ea9cb56fae8 100644
--- a/storage/src/vespa/storage/distributor/operations/idealstate/splitoperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/idealstate/splitoperation.cpp
@@ -2,7 +2,6 @@
#include "splitoperation.h"
#include <vespa/storage/distributor/idealstatemanager.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storageapi/message/bucketsplitting.h>
#include <vespa/storage/distributor/distributor_bucket_space.h>
#include <climits>
@@ -107,11 +106,6 @@ SplitOperation::onReceive(DistributorMessageSender&, const api::StorageReply::SP
(DatabaseUpdate::CREATE_IF_NONEXISTING
| DatabaseUpdate::RESET_TRUSTED));
- LOG_BUCKET_OPERATION_NO_LOCK(
- sinfo.first, vespalib::make_string(
- "Split from bucket %s: %s",
- getBucketId().toString().c_str(),
- copy.toString().c_str()));
}
} else if (
rep.getResult().getResult() == api::ReturnCode::BUCKET_NOT_FOUND
@@ -137,21 +131,6 @@ SplitOperation::onReceive(DistributorMessageSender&, const api::StorageReply::SP
getBucketId().toString().c_str(),
rep.getResult().toString().c_str());
}
-#ifdef ENABLE_BUCKET_OPERATION_LOGGING
- if (_ok) {
- LOG_BUCKET_OPERATION_NO_LOCK(
- getBucketId(), vespalib::make_string(
- "Split OK on node %d: %s. Finished: %s",
- node, ost.str().c_str(),
- _tracker.finished() ? "yes" : "no"));
- } else {
- LOG_BUCKET_OPERATION_NO_LOCK(
- getBucketId(), vespalib::make_string(
- "Split FAILED on node %d: %s. Finished: %s",
- node, rep.getResult().toString().c_str(),
- _tracker.finished() ? "yes" : "no"));
- }
-#endif
if (_tracker.finished()) {
LOG(debug, "Split done on node %d: %s completed operation",
diff --git a/storage/src/vespa/storage/distributor/pending_bucket_space_db_transition.cpp b/storage/src/vespa/storage/distributor/pending_bucket_space_db_transition.cpp
index 6983e3594af..7eb2e2bf236 100644
--- a/storage/src/vespa/storage/distributor/pending_bucket_space_db_transition.cpp
+++ b/storage/src/vespa/storage/distributor/pending_bucket_space_db_transition.cpp
@@ -4,7 +4,6 @@
#include "clusterinformation.h"
#include "pendingclusterstate.h"
#include "distributor_bucket_space.h"
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <algorithm>
#include <vespa/log/log.h>
diff --git a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
index 3dda989ff74..d009375a641 100644
--- a/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
+++ b/storage/src/vespa/storage/distributor/pendingclusterstate.cpp
@@ -6,7 +6,6 @@
#include "distributor_bucket_space_repo.h"
#include "distributor_bucket_space.h"
#include <vespa/storageframework/defaultimplementation/clock/realclock.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storage/common/global_bucket_space_distribution_converter.h>
#include <vespa/document/bucket/fixed_bucket_spaces.h>
#include <vespa/vespalib/util/xmlstream.hpp>
diff --git a/storage/src/vespa/storage/distributor/statecheckers.cpp b/storage/src/vespa/storage/distributor/statecheckers.cpp
index e861adda428..9616ca018b5 100644
--- a/storage/src/vespa/storage/distributor/statecheckers.cpp
+++ b/storage/src/vespa/storage/distributor/statecheckers.cpp
@@ -9,7 +9,6 @@
#include <vespa/storage/distributor/operations/idealstate/setbucketstateoperation.h>
#include <vespa/storage/distributor/operations/idealstate/mergeoperation.h>
#include <vespa/storage/distributor/operations/idealstate/garbagecollectionoperation.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/log/log.h>
diff --git a/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp b/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp
index 9a2fe2cd6ce..0ff12ac71bc 100644
--- a/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp
+++ b/storage/src/vespa/storage/persistence/bucketownershipnotifier.cpp
@@ -2,7 +2,6 @@
#include "bucketownershipnotifier.h"
#include <vespa/storage/common/nodestateupdater.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storage/common/content_bucket_space_repo.h>
#include <vespa/vdslib/state/cluster_state_bundle.h>
#include <vespa/storageapi/message/bucket.h>
@@ -83,12 +82,6 @@ BucketOwnershipNotifier::logNotification(const document::Bucket &bucket,
currentOwnerIndex,
sourceIndex,
newInfo.toString().c_str());
- LOG_BUCKET_OPERATION_NO_LOCK(
- bucket,
- vespalib::make_string(
- "Sending notify to distributor %u "
- "(ownership changed away from %u)",
- currentOwnerIndex, sourceIndex));
}
void
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 226df025465..c97965969bc 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -9,7 +9,6 @@
#include <vespa/storage/bucketdb/storbucketdb.h>
#include <vespa/storage/common/bucketmessages.h>
#include <vespa/storage/common/statusmessages.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storage/common/messagebucket.h>
#include <vespa/storage/persistence/asynchandler.h>
#include <vespa/storage/persistence/messages.h>
@@ -480,16 +479,6 @@ FileStorHandlerImpl::remapMessage(api::StorageMessage& msg, const document::Buck
if (idx > -1) {
cmd.remapBucketId(targets[idx]->bucket.getBucketId());
targets[idx]->foundInQueue = true;
-#if defined(ENABLE_BUCKET_OPERATION_LOGGING)
- {
- vespalib::string desc = vespalib::make_string(
- "Remapping %s from %s to %s, targetDisk = %u",
- cmd.toString().c_str(), source.toString().c_str(),
- targets[idx]->bid.toString().c_str(), targetDisk);
- LOG_BUCKET_OPERATION_NO_LOCK(source, desc);
- LOG_BUCKET_OPERATION_NO_LOCK(targets[idx]->bid, desc);
- }
-#endif
newBucket = targets[idx]->bucket;
} else {
document::DocumentId did(getDocId(msg));
@@ -522,16 +511,6 @@ FileStorHandlerImpl::remapMessage(api::StorageMessage& msg, const document::Buck
cmd.toString().c_str(), targets[0]->bucket.getBucketId().toString().c_str());
cmd.remapBucketId(targets[0]->bucket.getBucketId());
newBucket = targets[0]->bucket;
-#ifdef ENABLE_BUCKET_OPERATION_LOGGING
- {
- vespalib::string desc = vespalib::make_string(
- "Remapping %s from %s to %s, targetDisk = %u",
- cmd.toString().c_str(), source.toString().c_str(),
- targets[0]->bid.toString().c_str(), targetDisk);
- LOG_BUCKET_OPERATION_NO_LOCK(source, desc);
- LOG_BUCKET_OPERATION_NO_LOCK(targets[0]->bid, desc);
- }
-#endif
}
} else {
LOG(debug, "Did not remap %s with bucket %s from bucket %s",
diff --git a/storage/src/vespa/storage/persistence/simplemessagehandler.cpp b/storage/src/vespa/storage/persistence/simplemessagehandler.cpp
index 5a5d3dcabca..9c31a1c81bc 100644
--- a/storage/src/vespa/storage/persistence/simplemessagehandler.cpp
+++ b/storage/src/vespa/storage/persistence/simplemessagehandler.cpp
@@ -3,7 +3,6 @@
#include "simplemessagehandler.h"
#include "persistenceutil.h"
#include <vespa/persistence/spi/persistenceprovider.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/document/base/exceptions.h>
#include <vespa/document/fieldset/fieldsetrepo.h>
@@ -105,7 +104,6 @@ SimpleMessageHandler::handleCreateBucket(api::CreateBucketCommand& cmd, MessageT
LOG(debug, "CreateBucket(%s)", cmd.getBucketId().toString().c_str());
if (_env._fileStorHandler.isMerging(cmd.getBucket())) {
LOG(warning, "Bucket %s was merging at create time. Unexpected.", cmd.getBucketId().toString().c_str());
- DUMP_LOGGED_BUCKET_OPERATIONS(cmd.getBucketId());
}
spi::Bucket spiBucket(cmd.getBucket());
_spi.createBucket(spiBucket, tracker->context());
@@ -147,7 +145,6 @@ SimpleMessageHandler::handleDeleteBucket(api::DeleteBucketCommand& cmd, MessageT
{
tracker->setMetric(_env._metrics.deleteBuckets);
LOG(debug, "DeletingBucket(%s)", cmd.getBucketId().toString().c_str());
- LOG_BUCKET_OPERATION(cmd.getBucketId(), "deleteBucket()");
if (_env._fileStorHandler.isMerging(cmd.getBucket())) {
_env._fileStorHandler.clearMergeStatus(cmd.getBucket(),
api::ReturnCode(api::ReturnCode::ABORTED, "Bucket was deleted during the merge"));
diff --git a/storage/src/vespa/storage/storageserver/statemanager.cpp b/storage/src/vespa/storage/storageserver/statemanager.cpp
index 653822626ed..395e33a0393 100644
--- a/storage/src/vespa/storage/storageserver/statemanager.cpp
+++ b/storage/src/vespa/storage/storageserver/statemanager.cpp
@@ -6,7 +6,6 @@
#include <vespa/document/bucket/fixed_bucket_spaces.h>
#include <vespa/metrics/jsonwriter.h>
#include <vespa/metrics/metricmanager.h>
-#include <vespa/storage/common/bucketoperationlogger.h>
#include <vespa/storageapi/messageapi/storagemessage.h>
#include <vespa/vdslib/state/cluster_state_bundle.h>
#include <vespa/vespalib/io/fileutil.h>