text
stringlengths
1
24.5M
#pragma once #include <folly/logging/xlog.h> #include <optional> #include <string> #include <string_view> #include <variant> #include <vector> #include "common/app/ClientId.h" #include "common/kv/ITransaction.h" #include "common/serde/Serde.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #incl...
#pragma once #include <folly/logging/xlog.h> #include <optional> #include <string> #include <string_view> #include <utility> #include "common/kv/ITransaction.h" #include "common/kv/KeyPrefix.h" #include "common/serde/MessagePacket.h" #include "common/serde/Serde.h" #include "common/utils/Coroutine.h" #include "common...
#include "meta/store/Inode.h" #include <cassert> #include <cstddef> #include <fmt/core.h> #include <folly/Likely.h> #include <folly/futures/Future.h> #include <folly/logging/xlog.h> #include <linux/fs.h> #include <map> #include <optional> #include <string_view> #include <utility> #include "common/kv/ITransaction.h" #...
#pragma once #include <algorithm> #include <cstdint> #include <cstring> #include <folly/Likely.h> #include <folly/logging/xlog.h> #include <optional> #include <string> #include <string_view> #include <variant> #include <vector> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/u...
#include "meta/store/MetaStore.h" #include <cassert> #include <fmt/core.h> #include <folly/logging/xlog.h> #include <memory> #include <utility> #include "common/app/NodeId.h" #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "common/utils/UtcTime.h" #inc...
#pragma once #include <boost/core/ignore_unused.hpp> #include <fcntl.h> #include <folly/Likely.h> #include <folly/lang/Bits.h> #include <gtest/gtest_prod.h> #include <memory> #include <optional> #include <queue> #include <string_view> #include <utility> #include <variant> #include <vector> #include "client/mgmtd/ICom...
#pragma once #include <cassert> #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include <functional> #include <memory> #include <optional> #include <type_traits> #include <utility> #include "common/kv/ITransaction.h" #include "common/monitor/Recorder.h" #include "common/monitor/Sample.h" #include "comm...
#include "meta/store/PathResolve.h" #include <cstddef> #include <fcntl.h> #include <folly/Overload.h> #include <folly/ScopeGuard.h> #include <folly/functional/Partial.h> #include <folly/logging/xlog.h> #include <functional> #include <iterator> #include <map> #include <numeric> #include <variant> #include "common/moni...
#pragma once #include <folly/Overload.h> #include <folly/Utility.h> #include <gtest/gtest_prod.h> #include <optional> #include <utility> #include <variant> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Duration.h" #include "common/utils/Path.h" #include "fbs/meta/Commo...
#pragma once #include <algorithm> #include <cassert> #include <fcntl.h> #include <folly/Overload.h> #include <folly/logging/xlog.h> #include <string> #include <string_view> #include <utility> #include <vector> #include "client/mgmtd/ICommonMgmtdClient.h" #include "common/utils/ConfigBase.h" #include "common/utils/Cor...
#include "BatchOperation.h" #include <algorithm> #include <bits/ranges_algo.h> #include <boost/iterator/transform_iterator.hpp> #include <cassert> #include <exception> #include <fcntl.h> #include <folly/Likely.h> #include <folly/Range.h> #include <folly/ScopeGuard.h> #include <folly/Synchronized.h> #include <folly/exp...
#pragma once #include <atomic> #include <cassert> #include <folly/ScopeGuard.h> #include <folly/Synchronized.h> #include <folly/Utility.h> #include <folly/experimental/coro/Baton.h> #include <folly/logging/xlog.h> #include <functional> #include <map> #include <memory> #include <optional> #include <type_traits> #includ...
#include <folly/logging/xlog.h> #include <memory> #include <stack> #include <vector> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "meta/store/DirEntry.h" #include "meta/store/MetaStore.h" #include "meta/store/Operation.h" #include "meta/store/Utils.h...
#include <algorithm> #include <cassert> #include <fcntl.h> #include <fmt/core.h> #include <folly/logging/xlog.h> #include <limits> #include <linux/fs.h> #include <memory> #include <utility> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "common/utils/U...
#include <fcntl.h> #include <folly/logging/xlog.h> #include <memory> #include <utility> #include "common/kv/ITransaction.h" #include "common/monitor/Recorder.h" #include "common/monitor/Sample.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "fbs/meta/Common.h" #include "meta/store/Inod...
#include <folly/logging/xlog.h> #include <memory> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "fbs/meta/Common.h" #include "fbs/meta/Schema.h" #include "fbs/meta/Service.h" #include "meta/store/MetaStore.h" #include "meta/store/Operation.h" #include...
#include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include <iterator> #include <memory> #include <optional> #include <sys/stat.h> #include "common/utils/FaultInjection.h" #include "common/utils/Result.h" #include "common/utils/Uuid.h" #include "fbs/meta/Common.h" #include "meta/store/DirEntry.h" #include "...
#include <cassert> #include <fcntl.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include "common/kv/ITransaction.h" #include "common/utils/Result.h" #include "fbs/meta/Common.h" #include "meta/components/GcManager.h" #include "meta/components/SessionManager.h" #include "meta/store/DirEntry....
#include <algorithm> #include <folly/Likely.h> #include <folly/experimental/coro/Collect.h> #include <folly/experimental/coro/Invoke.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include <utility> #include <vector> #include "client/meta/MetaClient.h" #include "common/kv/ITransaction.h" #inc...
#include <algorithm> #include <cassert> #include <fcntl.h> #include <fmt/core.h> #include <folly/Likely.h> #include <folly/ScopeGuard.h> #include <folly/experimental/coro/Collect.h> #include <folly/experimental/coro/CurrentExecutor.h> #include <folly/experimental/coro/Invoke.h> #include <folly/fibers/BatchSemaphore.h> ...
#include <algorithm> #include <cassert> #include <fcntl.h> #include <folly/Likely.h> #include <folly/experimental/coro/Collect.h> #include <folly/logging/xlog.h> #include <linux/fs.h> #include <memory> #include <optional> #include <set> #include <string> #include <sys/stat.h> #include <utility> #include <vector> #incl...
#include "SetAttr.h" #include <fcntl.h> #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include <optional> #include <sys/stat.h> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "common/utils/UtcTime.h" #include "fbs/meta/Common.h" #inclu...
#include <algorithm> #include <cmath> #include <compare> #include <folly/ScopeGuard.h> #include <folly/lang/Ordering.h> #include <folly/logging/xlog.h> #include <linux/fs.h> #include <memory> #include <optional> #include <type_traits> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "co...
#include <algorithm> #include <fcntl.h> #include <folly/Likely.h> #include <folly/Unit.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include <type_traits> #include "common/monitor/Recorder.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "common/utils/StatusC...
#include <chrono> #include <folly/logging/xlog.h> #include <memory> #include "common/kv/ITransaction.h" #include "common/utils/Result.h" #include "meta/store/MetaStore.h" #include "meta/store/Operation.h" namespace hf3fs::meta::server { /** MetaStore::statFs */ class StatFsOp : public ReadOnlyOperation<StatFsRsp> { ...
#include <cassert> #include <fcntl.h> #include <folly/logging/xlog.h> #include <memory> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "meta/event/Event.h" #include "meta/store/MetaStore.h" #include "meta/store/Operation.h" namespace hf3fs::meta::serv...
#include "common/app/TwoPhaseApplication.h" #include "memory/common/OverrideCppNewDelete.h" #include "mgmtd/MgmtdServer.h" int main(int argc, char *argv[]) { using namespace hf3fs; return TwoPhaseApplication<mgmtd::MgmtdServer>().run(argc, argv); }
#include "MgmtdConfigFetcher.h" #include <folly/experimental/coro/BlockingWait.h> #include "MgmtdServer.h" #include "common/app/ApplicationBase.h" #include "common/kv/WithTransaction.h" #include "fdb/FDBRetryStrategy.h" #include "fdb/HybridKvEngine.h" #include "mgmtd/store/MgmtdStore.h" namespace hf3fs::mgmtd { name...
#pragma once #include "common/app/AppInfo.h" #include "common/kv/IKVEngine.h" #include "fbs/mgmtd/ConfigInfo.h" #include "fdb/HybridKvEngineConfig.h" namespace hf3fs::mgmtd { class MgmtdServer; struct MgmtdConfigFetcher { template <typename ConfigT> explicit MgmtdConfigFetcher(const ConfigT &cfg) { init(cfg.k...
#include "MgmtdLauncherConfig.h" #include "common/app/ApplicationBase.h" #include "common/app/Utils.h" namespace hf3fs::mgmtd { void MgmtdLauncherConfig::init(const String &filePath, bool dump, const std::vector<config::KeyValue> &updates) { app_detail::initConfigFromFile(*this, filePath, dump, updates); auto rv...
#pragma once #include "common/net/ib/IBDevice.h" #include "fdb/HybridKvEngineConfig.h" namespace hf3fs::mgmtd { struct MgmtdLauncherConfig : public ConfigBase<MgmtdLauncherConfig> { CONFIG_ITEM(cluster_id, ""); CONFIG_ITEM(use_memkv, false); // deprecated CONFIG_OBJ(fdb, kv::fdb::FDBConfig); // deprecat...
#include "MgmtdServer.h" #include <folly/experimental/coro/BlockingWait.h> #include <folly/logging/xlog.h> #include "common/app/ApplicationBase.h" #include "core/app/ServerEnv.h" #include "core/service/CoreService.h" #include "fdb/HybridKvEngine.h" #include "service/MgmtdService.h" #include "stubs/common/RealStubFact...
#pragma once #include "MgmtdConfigFetcher.h" #include "MgmtdLauncherConfig.h" #include "common/net/Server.h" #include "core/app/ServerAppConfig.h" #include "core/app/ServerLauncher.h" #include "fdb/HybridKvEngineConfig.h" #include "mgmtd/service/MgmtdOperator.h" #include "service/MgmtdConfig.h" namespace hf3fs::mgmtd...
#include "MgmtdBackgroundRunner.h" #include "MgmtdChainsUpdater.h" #include "MgmtdClientSessionsChecker.h" #include "MgmtdHeartbeatChecker.h" #include "MgmtdHeartbeater.h" #include "MgmtdLeaseExtender.h" #include "MgmtdMetricsUpdater.h" #include "MgmtdNewBornChainsChecker.h" #include "MgmtdRoutingInfoVersionUpdater.h"...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs { class BackgroundRunner; namespace mgmtd { class MgmtdHeartbeater; class MgmtdLeaseExtender; struct MgmtdState; class MgmtdChainsUpdater; class MgmtdClientSessionsChecker; class MgmtdHeartbeatChecker; class MgmtdNewBornChainsChecker; class MgmtdRouting...
#include "MgmtdChainsUpdater.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { struct Op : core::ServiceOperationWithMetric<"MgmtdService", "UpdateChains", "bg"> { String toStringImp...
#pragma once #include "common/utils/Coroutine.h" #include "common/utils/UtcTime.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdChainsUpdater { public: explicit MgmtdChainsUpdater(MgmtdState &state); CoTask<void> update(SteadyTime &lastUpdateTs); private: bool lastAdjustTargetOrderFlag = false; ...
#include "MgmtdClientSessionsChecker.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { struct Op : core::ServiceOperationWithMetric<"MgmtdService", "CheckClientSessions", "bg"> { Str...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdClientSessionsChecker { public: explicit MgmtdClientSessionsChecker(MgmtdState &state); CoTask<void> check(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "MgmtdHeartbeatChecker.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { flat::NodeInfo onNodeFailed(const flat::NodeInfo &oldNodeInfo, UtcTime) { auto sn = oldNodeInfo; s...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdHeartbeatChecker { public: explicit MgmtdHeartbeatChecker(MgmtdState &state); CoTask<void> check(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "MgmtdHeartbeater.h" #include "common/app/ApplicationBase.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { struct MgmtdHeartbeater::SendHeartbeatContext { flat::MgmtdLeaseInfo lease; ...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdHeartbeater { public: explicit MgmtdHeartbeater(MgmtdState &state); ~MgmtdHeartbeater(); CoTask<void> send(); struct SendHeartbeatContext; private: MgmtdState &state_; std::unique_ptr<SendHeartbea...
#include "MgmtdLeaseExtender.h" #include <folly/experimental/coro/Collect.h> #include "common/utils/StringUtils.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgm...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdLeaseExtender { public: explicit MgmtdLeaseExtender(MgmtdState &state); CoTask<void> extend(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "MgmtdMetricsUpdater.h" #include "common/utils/StringUtils.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { template <NameWrapper MetricName, typename Map> void recordCount(c...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdMetricsUpdater { public: explicit MgmtdMetricsUpdater(MgmtdState &state); CoTask<void> update(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "MgmtdNewBornChainsChecker.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { struct Op : core::ServiceOperationWithMetric<"MgmtdService", "CheckNewBornChains", "bg"> { Strin...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdNewBornChainsChecker { public: explicit MgmtdNewBornChainsChecker(MgmtdState &state); CoTask<void> check(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "MgmtdRoutingInfoVersionUpdater.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { struct Op : core::ServiceOperationWithMetric<"MgmtdService", "BumpRoutingInfoVersion", "bg"> ...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdRoutingInfoVersionUpdater { public: explicit MgmtdRoutingInfoVersionUpdater(MgmtdState &state); CoTask<void> update(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "MgmtdTargetInfoLoader.h" #include "common/utils/OptionalUtils.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { #define OP_NAME "LoadTargetInfo" struct Op : core::ServiceOp...
#pragma once #include "common/utils/Coroutine.h" #include "common/utils/UtcTime.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdTargetInfoLoader { public: explicit MgmtdTargetInfoLoader(MgmtdState &state); CoTask<void> run(); private: SteadyTime loadedLeaseStart; MgmtdState &state_; }; } // nam...
#include "MgmtdTargetInfoPersister.h" #include "common/utils/OptionalUtils.h" #include "core/utils/ServiceOperation.h" #include "core/utils/runOp.h" #include "mgmtd/service/MgmtdState.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { #define OP_NAME "PersistTargetInfo" struct Op : core::Ser...
#pragma once #include "common/utils/Coroutine.h" namespace hf3fs::mgmtd { struct MgmtdState; class MgmtdTargetInfoPersister { public: explicit MgmtdTargetInfoPersister(MgmtdState &state); CoTask<void> run(); private: MgmtdState &state_; }; } // namespace hf3fs::mgmtd
#include "EnableDisableNodeOperation.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { flat::NodeInfo onNodeEnabled(const flat::NodeInfo &oldNodeInfo, UtcTime) { flat::NodeInfo sn = oldNodeInfo; sn.status = flat::NodeStatus::HEARTBEAT_CONNECTING; [[...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct EnableNodeOperation : core::ServiceOperationWithMetric<"MgmtdService", "EnableNode", "op"> { EnableNodeReq req; explicit EnableNodeOperation(EnableNodeReq r) ...
#include "ExtendClientSessionOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<ExtendClientSessionRsp> ExtendClientSessionOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); const auto &cl...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct ExtendClientSessionOperation : core::ServiceOperationWithMetric<"MgmtdService", "ExtendClientSession", "op"> { ExtendClientSessionReq req; explicit ExtendClientSe...
#include "GetClientSessionOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<GetClientSessionRsp> GetClientSessionOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); if (req.clientId.empty()) { CO_RETURN_AND_LOG_OP_ERR(*thi...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct GetClientSessionOperation : core::ServiceOperationWithMetric<"MgmtdService", "GetClientSession", "op"> { GetClientSessionReq req; explicit GetClientSessionOperati...
#include "GetConfigOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<GetConfigRsp> GetConfigOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); auto nodeType = req.nodeType; auto version = req.configVersion; auto handler ...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct GetConfigOperation : core::ServiceOperationWithMetric<"MgmtdService", "GetConfig", "op"> { GetConfigReq req; explicit GetConfigOperation(GetConfigReq r) : r...
#include "GetConfigVersionsOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<GetConfigVersionsRsp> GetConfigVersionsOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); auto handler = [&]()...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct GetConfigVersionsOperation : core::ServiceOperationWithMetric<"MgmtdService", "GetConfigVersions", "op"> { GetConfigVersionsReq req; explicit GetConfigVersionsOpe...
#include "GetPrimaryMgmtdOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<GetPrimaryMgmtdRsp> GetPrimaryMgmtdOperation::handle(MgmtdState &state) const { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); auto now = state.utcNow(); auto lease = co_await state.cu...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct GetPrimaryMgmtdOperation : core::ServiceOperationWithMetric<"MgmtdService", "GetPrimaryMgmtd", "op"> { GetPrimaryMgmtdReq req; explicit GetPrimaryMgmtdOperation(...
#include "GetRoutingInfoOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<GetRoutingInfoRsp> GetRoutingInfoOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); auto handler = [&]() -> CoTryTask<GetRoutingInfoRsp> { auto dat...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct GetRoutingInfoOperation : core::ServiceOperationWithMetric<"MgmtdService", "GetRoutingInfo", "op"> { GetRoutingInfoReq req; explicit GetRoutingInfoOperation(GetR...
#include "GetUniversalTagsOperation.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<GetUniversalTagsRsp> GetUniversalTagsOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); auto handler = [&]() ->...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct GetUniversalTagsOperation : core::ServiceOperationWithMetric<"MgmtdService", "GetUniversalTags", "op"> { GetUniversalTagsReq req; explicit GetUniversalTagsOperati...
#include "HeartbeatOperation.h" #include "common/utils/StringUtils.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { flat::NodeInfo onNewNode(const flat::HeartbeatInfo &hb, UtcTime now) { flat::NodeInfo sn; sn.app = hb.app; sn.type = hb.type(); sn...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct HeartbeatOperation : core::ServiceOperationWithMetric<"MgmtdService", "Heartbeat", "op"> { HeartbeatReq req; explicit HeartbeatOperation(HeartbeatReq r) : r...
#pragma once #include "mgmtd/ops/EnableDisableNodeOperation.h" #include "mgmtd/ops/ExtendClientSessionOperation.h" #include "mgmtd/ops/GetClientSessionOperation.h" #include "mgmtd/ops/GetConfigOperation.h" #include "mgmtd/ops/GetConfigVersionsOperation.h" #include "mgmtd/ops/GetPrimaryMgmtdOperation.h" #include "mgmtd...
#include "ListClientSessionsOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<ListClientSessionsRsp> ListClientSessionsOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); const auto bootstrappingLength = state.config_.bootstra...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct ListClientSessionsOperation : core::ServiceOperationWithMetric<"MgmtdService", "ListClientSessions", "op"> { ListClientSessionsReq req; explicit ListClientSession...
#include "ListOrphanTargetsOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" #include "mgmtd/service/updateChain.h" namespace hf3fs::mgmtd { CoTryTask<ListOrphanTargetsRsp> ListOrphanTargetsOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, r...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct ListOrphanTargetsOperation : core::ServiceOperationWithMetric<"MgmtdService", "ListOrphanTargets", "op"> { ListOrphanTargetsReq req; explicit ListOrphanTargetsOpe...
#include "RegisterNodeOperation.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<RegisterNodeRsp> RegisterNodeOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); CO_RETURN_ON_ERROR(co_await state.va...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct RegisterNodeOperation : core::ServiceOperationWithMetric<"MgmtdService", "RegisterNode", "op"> { RegisterNodeReq req; explicit RegisterNodeOperation(RegisterNodeR...
#include "RotateAsPreferredOrderOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" #include "mgmtd/service/updateChain.h" namespace hf3fs::mgmtd { CoTryTask<RotateAsPreferredOrderRsp> RotateAsPreferredOrderOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClu...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct RotateAsPreferredOrderOperation : core::ServiceOperationWithMetric<"MgmtdService", "RotateAsPreferredOrder", "op"> { RotateAsPreferredOrderReq req; explicit R...
#include "RotateLastSrvOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" #include "mgmtd/service/updateChain.h" namespace hf3fs::mgmtd { CoTryTask<RotateLastSrvRsp> RotateLastSrvOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct RotateLastSrvOperation : core::ServiceOperationWithMetric<"MgmtdService", "RotateLastSrv", "op"> { RotateLastSrvReq req; explicit RotateLastSrvOperation(RotateLas...
#include "SetChainsOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { flat::ChainInfo makeChainInfo(const flat::ChainSetting &setting) { flat::ChainInfo info; info.chainId = setting.chainId; info.chainVersion = flat::ChainVersion{1}; for (const auto &t : setting.targets) { ...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct SetChainsOperation : core::ServiceOperationWithMetric<"MgmtdService", "SetChains", "op"> { SetChainsReq req; explicit SetChainsOperation(SetChainsReq r) : r...
#include "SetChainTableOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { namespace { Result<Void> checkChains(core::ServiceOperation &ctx, const RoutingInfo &ri, const std::vector<flat::ChainId> &chains) { if (chains.empty()) { RETURN_AND_LOG_OP_ERR(ctx, MgmtdCode::kInvalidChainTable, "Em...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct SetChainTableOperation : core::ServiceOperationWithMetric<"MgmtdService", "SetChainTable", "op"> { SetChainTableReq req; explicit SetChainTableOperation(SetChainT...
#include "SetConfigOperation.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<SetConfigRsp> SetConfigOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); CO_RETURN_ON_ERROR(co_await state.validateAdmin(*this, req.user)); auto nodeType...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct SetConfigOperation : core::ServiceOperationWithMetric<"MgmtdService", "SetConfig", "op"> { SetConfigReq req; explicit SetConfigOperation(SetConfigReq r) : r...
#include "SetNodeTagsOperation.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<SetNodeTagsRsp> SetNodeTagsOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); CO_RETURN_ON_ERROR(co_await state.valid...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct SetNodeTagsOperation : core::ServiceOperationWithMetric<"MgmtdService", "SetNodeTags", "op"> { SetNodeTagsReq req; explicit SetNodeTagsOperation(SetNodeTagsReq r)...
#include "SetPreferredTargetOrderOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" #include "mgmtd/service/updateChain.h" namespace hf3fs::mgmtd { CoTryTask<SetPreferredTargetOrderRsp> SetPreferredTargetOrderOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validate...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct SetPreferredTargetOrderOperation : core::ServiceOperationWithMetric<"MgmtdService", "SetPreferredTargetOrder", "op"> { SetPreferredTargetOrderReq req; explici...
#include "SetUniversalTagsOperation.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<SetUniversalTagsRsp> SetUniversalTagsOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); CO_RETURN_ON_ERROR(co_aw...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct SetUniversalTagsOperation : core::ServiceOperationWithMetric<"MgmtdService", "SetUniversalTags", "op"> { SetUniversalTagsReq req; explicit SetUniversalTagsOperati...
#include "UnregisterNodeOperation.h" #include "common/utils/StringUtils.h" #include "fbs/mgmtd/NodeConversion.h" #include "mgmtd/service/helpers.h" namespace hf3fs::mgmtd { CoTryTask<UnregisterNodeRsp> UnregisterNodeOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.cluster...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct UnregisterNodeOperation : core::ServiceOperationWithMetric<"MgmtdService", "UnregisterNode", "op"> { UnregisterNodeReq req; explicit UnregisterNodeOperation(Unreg...
#include "UpdateChainOperation.h" #include "common/utils/StringUtils.h" #include "mgmtd/service/helpers.h" #include "mgmtd/service/updateChain.h" namespace hf3fs::mgmtd { CoTryTask<UpdateChainRsp> UpdateChainOperation::handle(MgmtdState &state) { CO_RETURN_ON_ERROR(state.validateClusterId(*this, req.clusterId)); ...
#pragma once #include "core/utils/ServiceOperation.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/service/MgmtdState.h" namespace hf3fs::mgmtd { struct UpdateChainOperation : core::ServiceOperationWithMetric<"MgmtdService", "UpdateChain", "op"> { UpdateChainReq req; explicit UpdateChainOperation(UpdateChainReq r)...