text
stringlengths
1
24.5M
#pragma once #include "WithTimestamp.h" #include "fbs/mgmtd/ClientSession.h" namespace hf3fs::mgmtd { class ClientSession : public WithTimestamp<flat::ClientSession> { public: using Base = WithTimestamp<flat::ClientSession>; using Base::Base; flat::ClientSessionVersion clientSessionVersion{0}; }; } // namesp...
#include "helpers.h" namespace hf3fs::mgmtd { CoTask<void> updateMemoryRoutingInfo(MgmtdState &state, core::ServiceOperation &ctx) { static const auto handler = [](RoutingInfo &) {}; co_await updateMemoryRoutingInfo(state, ctx, handler); } CoTryTask<void> updateStoredRoutingInfo(MgmtdState &state, core::ServiceOp...
#include <atomic> #include <folly/experimental/coro/Sleep.h> #include "MgmtdConfig.h" #include "MgmtdOperator.h" #include "MgmtdState.h" #include "common/kv/WithTransaction.h" #include "core/utils/ServiceOperation.h" #define RECORD_LATENCY(latency) ...
#pragma once #include "fbs/mgmtd/MgmtdLeaseInfo.h" namespace hf3fs::mgmtd { struct LeaseInfo { std::optional<flat::MgmtdLeaseInfo> lease; bool bootstrapping = false; }; } // namespace hf3fs::mgmtd
#pragma once #include "fbs/mgmtd/LocalTargetInfo.h" namespace hf3fs::mgmtd { struct LocalTargetInfoWithNodeId { flat::TargetId targetId{0}; flat::NodeId nodeId{0}; flat::LocalTargetState localState{flat::LocalTargetState::INVALID}; LocalTargetInfoWithNodeId() = default; LocalTargetInfoWithNodeId(flat::Node...
#pragma once #include "common/kv/TransactionRetry.h" #include "common/utils/ConfigBase.h" #include "common/utils/Duration.h" #include "core/user/UserCache.h" namespace hf3fs::mgmtd { struct MgmtdConfig : ConfigBase<MgmtdConfig> { CONFIG_HOT_UPDATED_ITEM(lease_length, 60_s); CONFIG_HOT_UPDATED_ITEM(extend_lease_in...
#include "MgmtdData.h" #include "MgmtdConfig.h" #include "core/utils/ServiceOperation.h" #include "helpers.h" #include "updateChain.h" namespace hf3fs::mgmtd { Result<Void> MgmtdData::checkConfigVersion(core::ServiceOperation &ctx, flat::NodeType type, ...
#pragma once #include <folly/Synchronized.h> #include "ClientSession.h" #include "LeaseInfo.h" #include "RoutingInfo.h" #include "common/utils/RobinHoodUtils.h" #include "fbs/mgmtd/ConfigInfo.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "fbs/mgmtd/RoutingInfo.h" namespace hf3fs::core { struct ServiceOperation; } n...
#include "MgmtdOperator.h" #include <folly/experimental/coro/BlockingWait.h> #include "core/utils/runOp.h" #include "mgmtd/ops/Include.h" #define DEFINE_SERDE_SERVICE_METHOD_FULL(svc, method, Method, Id, Req, Rsp) \ CoTryTask<Rsp> svc##Operator::method(Req req, const net::PeerInfo &peer) { \ Method##Operation...
#pragma once #include "MgmtdState.h" #include "common/net/PeerInfo.h" #include "fbs/mgmtd/Rpc.h" #include "mgmtd/background/MgmtdBackgroundRunner.h" namespace hf3fs::mgmtd { namespace testing { class MgmtdTestHelper; } class MgmtdOperator : public folly::NonCopyableNonMovable { public: MgmtdOperator(std::shared_p...
#include "MgmtdService.h" #include "MgmtdOperator.h" #define DEFINE_SERDE_SERVICE_METHOD_FULL(svc, name, Name, id, reqtype, rsptype) \ CoTryTask<rsptype> svc##Service::name(serde::CallContext &ctx, const reqtype &req) { \ co_return co_await operator_.name(req, net::PeerInfo{ctx.peer()}); ...
#pragma once #include "common/serde/CallContext.h" #include "fbs/mgmtd/MgmtdServiceBase.h" namespace hf3fs::mgmtd { class MgmtdOperator; class MgmtdService : public serde::ServiceWrapper<MgmtdService, MgmtdServiceBase> { public: MgmtdService(MgmtdOperator &opr) : operator_(opr) {} #define DEFINE_SERDE_SERVI...
#include "MgmtdState.h" #include "MgmtdConfig.h" #include "core/user/UserToken.h" #include "fbs/mgmtd/NodeConversion.h" #include "helpers.h" namespace hf3fs::mgmtd { namespace { flat::NodeInfo initSelfNodeInfo(core::ServerEnv &env) { flat::NodeInfo selfNodeInfo; const auto &appInfo = env.appInfo(); selfNodeInfo...
#pragma once #include <folly/experimental/coro/Mutex.h> #include "MgmtdData.h" #include "common/utils/BackgroundRunner.h" #include "common/utils/CoroSynchronized.h" #include "common/utils/DefaultRetryStrategy.h" #include "core/app/ServerEnv.h" #include "core/user/UserStoreEx.h" #include "fbs/mgmtd/NodeInfo.h" #includ...
#pragma once #include <folly/Expected.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <folly/executors/ThreadPoolExecutor.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include <unistd.h> #include "common/utils/ConfigBase.h" #include "common/utils/Coroutine.h" #include "commo...
#pragma once #include "WithTimestamp.h" #include "common/utils/SimpleRingBuffer.h" #include "fbs/mgmtd/NodeInfo.h" #include "fbs/mgmtd/NodeStatusChange.h" namespace hf3fs::mgmtd { class NodeInfoWrapper : public WithTimestamp<flat::NodeInfo> { public: using Base = WithTimestamp<flat::NodeInfo>; using Base::Base; ...
#include "RoutingInfo.h" #include "MgmtdConfig.h" #include "core/utils/ServiceOperation.h" #include "helpers.h" namespace hf3fs::mgmtd { void RoutingInfo::applyChainTargetChanges(core::ServiceOperation &ctx, const std::vector<flat::ChainInfo> &changedChains, ...
#pragma once #include "LocalTargetInfoWithNodeId.h" #include "NodeInfoWrapper.h" #include "TargetInfo.h" #include "fbs/mgmtd/ChainInfo.h" #include "fbs/mgmtd/ChainTable.h" #include "fbs/mgmtd/MgmtdTypes.h" namespace hf3fs::core { struct ServiceOperation; } namespace hf3fs::mgmtd { struct MgmtdConfig; class MgmtdTarg...
#pragma once #include "WithTimestamp.h" #include "fbs/mgmtd/TargetInfo.h" namespace hf3fs::mgmtd { class TargetInfo : public WithTimestamp<flat::TargetInfo> { public: using Base = WithTimestamp<flat::TargetInfo>; using Base::Base; bool locationInitLoaded = false; std::optional<flat::NodeId> persistedNodeId;...
#include "updateChain.h" #include "common/utils/OptionalUtils.h" namespace hf3fs::mgmtd { namespace { using PS = enum flat::PublicTargetState; using LS = enum flat::LocalTargetState; using TargetsByPs = robin_hood::unordered_map<PS, std::vector<ChainTargetInfoEx>>; void dispatch(TargetsByPs &targetsByPs, ChainTarget...
#pragma once #include "LocalTargetInfoWithNodeId.h" #include "fbs/mgmtd/ChainTargetInfo.h" #include "fbs/mgmtd/TargetInfo.h" namespace hf3fs::mgmtd { struct ChainTargetInfoEx : public flat::ChainTargetInfo { ChainTargetInfoEx() = default; ChainTargetInfoEx(const flat::ChainTargetInfo &cti, flat::LocalTargetState ...
#pragma once #include "common/utils/UtcTime.h" #include "fbs/mgmtd/TargetInfo.h" namespace hf3fs::mgmtd { template <typename T> class WithTimestamp { public: WithTimestamp() : base_(), ts_(SteadyClock::now()) {} explicit WithTimestamp(T info) : base_(std::move(info)), ts_(SteadyClock...
#include "MgmtdStore.h" #include <folly/experimental/coro/Collect.h> #include <folly/lang/Bits.h> #include "common/kv/KeyPrefix.h" #include "common/utils/MagicEnum.hpp" #include "common/utils/SerDeser.h" #include "common/utils/StringUtils.h" #include "common/utils/Transform.h" #include "fbs/mgmtd/NodeConversion.h" #i...
#pragma once #include <optional> #include <string> #include <string_view> #include <vector> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/UtcTime.h" #include "fbs/mgmtd/ChainInfo.h" #include "fbs/mgmtd/ChainTable.h" #include "fbs/mgmtd/ConfigInfo.h" #include "fbs/mgmtd...
#include "common/app/OnePhaseApplication.h" #include "memory/common/OverrideCppNewDelete.h" #include "migration/service/Server.h" int main(int argc, char *argv[]) { return hf3fs::OnePhaseApplication<hf3fs::migration::server::MigrationServer>::instance().run(argc, argv); }
#include "migration/service/Server.h" #include <folly/experimental/coro/BlockingWait.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include "common/app/ApplicationBase.h" #include "core/service/CoreService.h" #include "migration/service/Service.h" #include "stubs/common/RealStubFactory.h" #...
#pragma once #include <memory> #include "client/mgmtd/MgmtdClientForClient.h" #include "client/storage/StorageClient.h" #include "common/logging/LogConfig.h" #include "common/net/Client.h" #include "common/net/Server.h" #include "common/utils/BackgroundRunner.h" #include "common/utils/ConfigBase.h" #include "core/app...
#include "Service.h" #include "common/serde/CallContext.h" #include "fbs/migration/SerdeService.h" namespace hf3fs::migration::server { #define DEFINE_SERVICE_METHOD(METHOD, REQ, RESP) \ CoTryTask<RESP> MigrationService::METHOD(serde::CallContext &, const REQ &req) MigrationService::MigrationService() {} DEFINE_...
#pragma once #include "common/serde/CallContext.h" #include "fbs/migration/SerdeService.h" namespace hf3fs::migration::server { class MigrationService : public serde::ServiceWrapper<MigrationService, MigrationSerde> { public: MigrationService(); #define DECLARE_SERVICE_METHOD(METHOD, REQ, RESP) CoTryTask<RESP> M...
#include "common/app/OnePhaseApplication.h" #include "memory/common/OverrideCppNewDelete.h" #include "monitor_collector/service/MonitorCollectorServer.h" int main(int argc, char *argv[]) { return hf3fs::OnePhaseApplication<hf3fs::monitor::MonitorCollectorServer>::instance().run(argc, argv); }
#include "monitor_collector/service/MonitorCollectorOperator.h" #include <algorithm> namespace hf3fs::monitor { static CountRecorder numQueueingSamples{"monitor_collector.num_queueing_samples"}; MonitorCollectorOperator::MonitorCollectorOperator(const MonitorCollectorService::Config &cfg) : cfg_(cfg) { sample...
#pragma once #include <condition_variable> #include <folly/MPMCQueue.h> #include <mutex> #include <thread> #include "common/monitor/Monitor.h" #include "monitor_collector/service/MonitorCollectorService.h" namespace hf3fs::monitor { class MonitorCollectorOperator { public: MonitorCollectorOperator(const MonitorC...
#include "monitor_collector/service/MonitorCollectorServer.h" #include "monitor_collector/service/MonitorCollectorOperator.h" namespace hf3fs::monitor { MonitorCollectorServer::MonitorCollectorServer(const MonitorCollectorServer::Config &config) : net::Server(config.base()), config_(config) {} MonitorColl...
#pragma once #include "common/net/Server.h" #include "monitor_collector/service/MonitorCollectorService.h" namespace hf3fs::monitor { class MonitorCollectorServer : public net::Server { public: static constexpr auto kName = "MonitorCollector"; struct Config : public ConfigBase<Config> { CONFIG_OBJ(base, ne...
#include "monitor_collector/service/MonitorCollectorService.h" #include <chrono> #include "monitor_collector/service/MonitorCollectorOperator.h" namespace hf3fs::monitor { CoTryTask<MonitorCollectorRsp> MonitorCollectorService::write(serde::CallContext &ctx, std::vector<Sample> &samples) { co_await monitorCollect...
#pragma once #include <condition_variable> #include <folly/MPMCQueue.h> #include <mutex> #include <thread> #include <vector> #include "common/monitor/Monitor.h" #include "common/serde/Service.h" #include "common/utils/ConfigBase.h" #include "fbs/monitor_collector/MonitorCollectorService.h" namespace hf3fs::monitor {...
#include "common/app/TwoPhaseApplication.h" #include "memory/common/OverrideCppNewDelete.h" #include "simple_example/service/Server.h" int main(int argc, char *argv[]) { using namespace hf3fs; return TwoPhaseApplication<simple_example::server::SimpleExampleServer>().run(argc, argv); }
#include "simple_example/service/Server.h" #include <folly/experimental/coro/BlockingWait.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include "common/app/ApplicationBase.h" #include "core/service/CoreService.h" #include "simple_example/service/Service.h" #include "stubs/common/RealStubFa...
#pragma once #include <memory> #include "client/mgmtd/MgmtdClientForServer.h" #include "client/storage/StorageClient.h" #include "common/logging/LogConfig.h" #include "common/net/Client.h" #include "common/net/Server.h" #include "common/utils/BackgroundRunner.h" #include "common/utils/ConfigBase.h" #include "core/app...
#include "Service.h" #include "common/serde/CallContext.h" #include "fbs/simple_example/SerdeService.h" namespace hf3fs::simple_example::server { #define DEFINE_SERVICE_METHOD(METHOD, REQ, RESP) \ CoTryTask<RESP> SimpleExampleService::METHOD(serde::CallContext &, const REQ &req) SimpleExampleService::SimpleExampl...
#pragma once #include "common/serde/CallContext.h" #include "fbs/simple_example/SerdeService.h" namespace hf3fs::simple_example::server { class SimpleExampleService : public serde::ServiceWrapper<SimpleExampleService, SimpleExampleSerde> { public: SimpleExampleService(); #define DECLARE_SERVICE_METHOD(METHOD, RE...
#include "common/app/TwoPhaseApplication.h" #include "memory/common/OverrideCppNewDelete.h" #include "storage/service/StorageServer.h" int main(int argc, char *argv[]) { using namespace hf3fs; return TwoPhaseApplication<storage::StorageServer>().run(argc, argv); }
#include "storage/aio/AioReadWorker.h" #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include <folly/system/ThreadName.h> #include "common/monitor/Recorder.h" #include "storage/aio/AioStatus.h" #include "storage/aio/BatchReadJob.h" namespace hf3fs::storage { monitor::LatencyRecorder batchReadInQueue...
#pragma once #include <atomic> #include <folly/Random.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <memory> #include <vector> #include "common/utils/BoundedQueue.h" #include "common/utils/ConfigBase.h" #include "common/utils/Result.h" #include "storage/aio/AioStatus.h" #include "storage/aio/BatchRea...
#include "storage/aio/AioStatus.h" #include <chrono> #include <liburing.h> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "storage/aio/BatchReadJob.h" namespace hf3fs::storage { namespace { monitor::DistributionRecorder inflightNum("storage.aio.inflight"); monitor::CountRecorder ai...
#pragma once #include <libaio.h> #include <liburing.h> #include <vector> #include "storage/aio/BatchReadJob.h" #include "storage/store/StorageTargets.h" namespace hf3fs::storage { class IoStatus { public: virtual ~IoStatus() = default; bool hasUnfinishedBatchReadJob() const { return iterator_; } void setAi...
#include "storage/aio/BatchReadJob.h" #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "storage/store/StorageTarget.h" namespace hf3fs::storage { monitor::CountRecorder rdmaWriteCount{"storage.rdma_write.count"}; monitor::CountRecorder rdmaWriteFails{"storage.rdma_write.fails"}; monit...
#pragma once #include <folly/experimental/coro/Baton.h> #include <utility> #include "chunk_engine/src/cxx.rs.h" #include "common/net/ib/IBSocket.h" #include "common/serde/CallContext.h" #include "common/utils/Duration.h" #include "fbs/storage/Common.h" #include "storage/store/ChunkMetadata.h" namespace hf3fs::storag...
#include "storage/service/BufferPool.h" #include <folly/experimental/coro/BlockingWait.h> #include <folly/experimental/coro/Collect.h> #include <folly/experimental/coro/Invoke.h> #include <folly/experimental/coro/Task.h> #include <sys/uio.h> #include "common/monitor/Recorder.h" #include "common/net/ib/RDMABuf.h" #inc...
#pragma once #include <folly/Synchronized.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <folly/fibers/Semaphore.h> #include <limits> #include "common/net/ib/RDMABuf.h" #include "common/utils/CPUExecutorGroup.h" #include "common/utils/ConfigBase.h" #include "common/utils/ConstructLog.h" #include "comm...
#include "storage/service/Components.h" #include <folly/experimental/coro/BlockingWait.h> #include "common/app/ApplicationBase.h" #include "common/monitor/Recorder.h" #include "common/utils/LogCommands.h" #include "stubs/common/RealStubFactory.h" #include "stubs/mgmtd/MgmtdServiceStub.h" namespace hf3fs::storage { n...
#pragma once #include <folly/concurrency/AtomicSharedPtr.h> #include "client/mgmtd/MgmtdClientForServer.h" #include "client/storage/StorageMessenger.h" #include "common/utils/ConfigBase.h" #include "common/utils/DynamicCoroutinesPool.h" #include "common/utils/LockManager.h" #include "common/utils/RobinHood.h" #includ...
#include "storage/service/ReliableForwarding.h" #include <folly/experimental/coro/Sleep.h> #include "common/app/ApplicationBase.h" #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/ExponentialBackoffRetry.h" #include "fbs/storage/Common.h" #include "storage/service/Compone...
#pragma once #include "client/storage/StorageMessenger.h" #include "common/net/Client.h" #include "common/net/ib/RDMABuf.h" #include "common/utils/ConfigBase.h" #include "fbs/storage/Common.h" #include "storage/update/UpdateJob.h" namespace hf3fs::storage { struct Components; struct Target; class ReliableForwarding...
#include "storage/service/ReliableUpdate.h" #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "storage/service/Components.h" #include "storage/service/StorageOperator.h" namespace hf3fs::storage { monitor::OperationRecorder reliableUpdateRecorder{"storage.reliable_update"}; monitor::Co...
#pragma once #include "common/net/Transport.h" #include "common/utils/ConfigBase.h" #include "common/utils/Coroutine.h" #include "common/utils/Duration.h" #include "common/utils/LockManager.h" #include "common/utils/RobinHood.h" #include "common/utils/Shards.h" #include "common/utils/Size.h" #include "fbs/storage/Comm...
#include "storage/service/StorageOperator.h" #include <boost/range/adaptor/reversed.hpp> #include <fmt/format.h> #include "common/monitor/Recorder.h" #include "common/net/RDMAControl.h" #include "common/net/RequestOptions.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "common/utils/Se...
#pragma once #include <folly/concurrency/ConcurrentHashMap.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include "analytics/StructuredTraceLog.h" #include "client/mgmtd/IMgmtdClientForServer.h" #include "client/mgmtd/RoutingInfo.h" #include "client/storage/StorageMessenger.h" #include "common/net/Server.h" #...
#include "storage/service/StorageServer.h" #include <folly/experimental/coro/BlockingWait.h> #include <folly/experimental/coro/WithCancellation.h> #include <folly/logging/xlog.h> #include "common/kv/mem/MemKVEngine.h" #include "common/utils/Result.h" #include "core/service/CoreService.h" #include "storage/service/Rel...
#pragma once #include <folly/CancellationToken.h> #include "client/mgmtd/MgmtdClientForServer.h" #include "common/net/Server.h" #include "core/app/ServerAppConfig.h" #include "core/app/ServerLauncher.h" #include "core/app/ServerLauncherConfig.h" #include "core/app/ServerMgmtdClientFetcher.h" #include "storage/service...
#include "storage/service/StorageService.h" #include "common/monitor/Recorder.h" namespace hf3fs::storage { namespace { monitor::LatencyRecorder readQueueLatency{"storage.read.queue_latency"}; monitor::LatencyRecorder updateQueueLatency{"storage.update.queue_latency"}; monitor::LatencyRecorder defaultQueueLatency{"s...
#pragma once #include "common/serde/CallContext.h" #include "fbs/storage/Service.h" #include "storage/service/StorageOperator.h" namespace hf3fs::storage { class StorageService : public serde::ServiceWrapper<StorageService, storage::StorageSerde> { public: StorageService(StorageOperator &storageOperator) : ...
#include "storage/service/TargetMap.h" #include <algorithm> #include "common/monitor/Recorder.h" #include "common/utils/RobinHood.h" #include "fbs/mgmtd/MgmtdTypes.h" namespace hf3fs::storage { namespace { monitor::OperationRecorder updateRoutingRecorder{"storage.update_routing"}; } // namespace Result<net::Addr...
#pragma once #include <atomic> #include <common/utils/RobinHood.h> #include <folly/concurrency/AtomicSharedPtr.h> #include <memory> #include "client/mgmtd/RoutingInfo.h" #include "common/serde/Serde.h" #include "common/utils/ConstructLog.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "fbs/mgmtd/NodeInfo.h" #include "f...
#include "ChunkEngine.h" #include "chunk_engine/src/cxx.rs.h" #include "fbs/storage/Common.h" #include "storage/update/UpdateJob.h" namespace hf3fs::storage { namespace { monitor::OperationRecorder storageUpdateRecorder{"storage.engine_update"}; monitor::OperationRecorder storageCommitRecorder{"storage.engine_commit...
#pragma once #include <limits> #include "chunk_engine/src/cxx.rs.h" #include "common/utils/UtcTime.h" #include "fbs/storage/Common.h" #include "storage/aio/BatchReadJob.h" #include "storage/update/UpdateJob.h" namespace hf3fs::storage { struct ChunkEngine { static void copyMeta(const chunk_engine::RawMeta &in, Ch...
#include "storage/store/ChunkFileStore.h" #include <fcntl.h> #include <folly/logging/xlog.h> #include <limits> #include "common/monitor/Recorder.h" #include "common/utils/Result.h" #include "storage/store/ChunkMetadata.h" namespace hf3fs::storage { namespace { monitor::OperationRecorder punchHoleRecorder{"storage.p...
#pragma once #include <folly/ThreadLocal.h> #include <mutex> #include "common/utils/ConfigBase.h" #include "common/utils/FdWrapper.h" #include "common/utils/Path.h" #include "common/utils/Result.h" #include "common/utils/RobinHood.h" #include "common/utils/Shards.h" #include "storage/store/ChunkFileView.h" #include "...
#include "storage/store/ChunkFileView.h" #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include <thread> #include <utility> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/ExponentialBackoffRetry.h" #include "storage/store/ChunkMetadata.h" namespace hf3f...
#pragma once #include <folly/Range.h> #include "common/utils/Result.h" #include "fbs/storage/Common.h" namespace hf3fs::storage { class ChunkFileView { public: // read a piece of data. Result<uint32_t> read(uint8_t *buf, size_t size, size_t offset, bool direct = false) const; // write a piece of data. Res...
#include "ChunkMetadata.h" #include "common/monitor/Recorder.h" namespace hf3fs::storage { namespace { monitor::CountRecorder fatalEvent{"storage.fatal"}; } // namespace void reportFatalEvent() { fatalEvent.addSample(1); } } // namespace hf3fs::storage
#pragma once #include <atomic> #include <bit> #include <cstddef> #include <cstdint> #include <folly/Hash.h> #include <folly/lang/Bits.h> #include <string> #include "common/serde/BigEndian.h" #include "common/serde/Serde.h" #include "common/utils/Int128.h" #include "common/utils/Result.h" #include "common/utils/Size.h...
#include "storage/store/ChunkMetaStore.h" #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include <limits> #include "common/monitor/Recorder.h" #include "common/serde/BigEndian.h" #include "common/serde/Serde.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "common/utils/...
#pragma once #include <folly/AtomicUnorderedMap.h> #include <memory> #include <queue> #include "common/utils/ConfigBase.h" #include "common/utils/Path.h" #include "common/utils/UtcTime.h" #include "kv/KVStore.h" #include "storage/store/ChunkFileStore.h" #include "storage/store/ChunkMetadata.h" #include "storage/store...
#include "storage/store/ChunkReplica.h" #include <folly/Random.h> #include <folly/logging/xlog.h> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/FileUtils.h" #include "common/utils/Result.h" #include "common/utils/SysResource.h" #include "fbs/storage/Common.h" #include ...
#pragma once #include <folly/Range.h> #include "common/utils/Result.h" #include "storage/aio/BatchReadJob.h" #include "storage/store/ChunkMetadata.h" #include "storage/store/ChunkStore.h" #include "storage/update/UpdateJob.h" namespace hf3fs::storage { class ChunkReplica { public: // prepare aio read. static R...
#include "storage/store/ChunkStore.h" #include <chrono> #include <fcntl.h> #include <folly/Hash.h> #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include "common/monitor/Recorder.h" #include "common/utils/Result.h" #include "storage/store/ChunkMetadata.h" #include "storage/store/ChunkReplica.h" #inclu...
#pragma once #include <folly/concurrency/ConcurrentHashMap.h> #include <optional> #include <vector> #include "common/monitor/Recorder.h" #include "common/utils/ConfigBase.h" #include "common/utils/FdWrapper.h" #include "common/utils/Path.h" #include "common/utils/Result.h" #include "common/utils/RobinHood.h" #include...
#include "storage/store/GlobalFileStore.h" #include <fcntl.h> #include <folly/logging/xlog.h> #include "common/utils/Duration.h" #include "common/utils/Size.h" namespace hf3fs::storage { Result<FileDescriptor *> GlobalFileStore::open(const Path &filePath, bool createFile /* = false */) { return shards_.withLock( ...
#pragma once #include <folly/ThreadLocal.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "common/utils/CPUExecutorGroup.h" #include "common/utils/ConfigBase.h" #include "common/utils/FdWrapper.h" #include "common/utils/Path.h" #include "common/utils/Result.h" #include "common/utils/Sha...
#pragma once #include "common/serde/Serde.h" #include "common/utils/Path.h" #include "common/utils/Size.h" #include "kv/KVStore.h" namespace hf3fs::storage { // Physical configuration of the storage target. Store in `target.toml`. static inline constexpr auto kPhysicalConfigFileName = "target.toml"; class PhysicalC...
#include "storage/store/StorageTarget.h" #include <boost/filesystem/operations.hpp> #include <folly/experimental/symbolizer/Symbolizer.h> #include <fstream> #include <sys/stat.h> #include "common/monitor/Recorder.h" #include "common/serde/Serde.h" #include "common/utils/MagicEnum.hpp" #include "common/utils/Result.h"...
#pragma once #include <folly/Synchronized.h> #include <unordered_map> #include "chunk_engine/src/cxx.rs.h" #include "common/monitor/Recorder.h" #include "common/utils/CoLockManager.h" #include "common/utils/ConfigBase.h" #include "common/utils/LockManager.h" #include "common/utils/Path.h" #include "storage/aio/BatchR...
#include "storage/store/StorageTargets.h" #include <boost/filesystem/operations.hpp> #include <folly/experimental/coro/BlockingWait.h> #include <folly/experimental/coro/Collect.h> #include <folly/experimental/coro/Sleep.h> #include <folly/experimental/coro/Task.h> #include <memory> #include <sys/statvfs.h> #include <u...
#pragma once #include <folly/executors/CPUThreadPoolExecutor.h> #include "chunk_engine/src/cxx.rs.h" #include "common/utils/CPUExecutorGroup.h" #include "common/utils/CoLockManager.h" #include "common/utils/ConfigBase.h" #include "common/utils/RobinHood.h" #include "fbs/mgmtd/HeartbeatInfo.h" #include "fbs/storage/Co...
#include "storage/sync/ResyncWorker.h" #include <folly/ScopeGuard.h> #include <folly/experimental/coro/Collect.h> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "fbs/storage/Common.h" #include "storage/service/Components.h" #include "storage/update/Up...
#pragma once #include <atomic> #include <condition_variable> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "client/storage/UpdateChannelAllocator.h" #include "common/serde/Serde.h" #include "common/utils/ConcurrencyLimiter.h" #include "common/utils/ConfigBase.h" #include "common/utils/C...
#pragma once #include <folly/experimental/coro/Baton.h> #include "chunk_engine/src/cxx.rs.h" #include "fbs/storage/Common.h" #include "storage/store/ChunkMetadata.h" #include "storage/store/ChunkStore.h" namespace hf3fs::storage { class StorageTarget; class ChunkEngineUpdateJob { public: ChunkEngineUpdateJob() ...
#include "storage/update/UpdateWorker.h" namespace hf3fs::storage { Result<Void> UpdateWorker::start(uint32_t numberOfDisks) { if (config_.num_threads() < numberOfDisks) { return makeError(StatusCode::kInvalidConfig, fmt::format("too few update worker threads, {} < {}", config_.num_threads(...
#pragma once #include <folly/executors/CPUThreadPoolExecutor.h> #include "common/utils/BoundedQueue.h" #include "storage/store/StorageTargets.h" #include "storage/update/UpdateJob.h" namespace hf3fs::storage { class UpdateWorker { public: class Config : public ConfigBase<Config> { CONFIG_ITEM(queue_size, 409...
#include "storage/worker/AllocateWorker.h" #include <memory> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "common/utils/UtcTime.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "storage/service/Components.h" namespace hf3fs::storage { AllocateWorker:...
#pragma once #include <atomic> #include <condition_variable> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "storage/service/TargetMap.h" namespace hf3fs::storage { struct Components; class AllocateWorker { public: class Config : public ConfigBase<Config> { CONFIG_HOT_UPDATED_I...
#include "storage/worker/CheckWorker.h" #include <fstream> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/UtcTime.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "storage/service/Components.h" namespace hf3fs::storage { namespace { monitor::ValueRecorder new_chunk_engin...
#pragma once #include <atomic> #include <condition_variable> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "common/utils/ConfigBase.h" #include "storage/service/TargetMap.h" namespace hf3fs::storage { struct Components; class CheckWorker { public: class Config : public ConfigBase<...
#include "storage/worker/DumpWorker.h" #include <gperftools/profiler.h> #include <fstream> #include <memory> #include <sys/times.h> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "common/utils/UtcTime.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "sto...
#pragma once #include <atomic> #include <condition_variable> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "fbs/storage/Common.h" #include "storage/service/TargetMap.h" namespace hf3fs::storage { struct Components; class DumpWorker { public: struct Config : ConfigBase<Config> { ...
#include "storage/worker/PunchHoleWorker.h" #include <memory> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "common/utils/UtcTime.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "storage/service/Components.h" namespace hf3fs::storage { PunchHoleWorke...
#pragma once #include <atomic> #include <condition_variable> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "storage/service/TargetMap.h" namespace hf3fs::storage { struct Components; class PunchHoleWorker { public: PunchHoleWorker(Components &components); // start recycle worke...
#include "storage/worker/SyncMetaKvWorker.h" #include <memory> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/Result.h" #include "common/utils/UtcTime.h" #include "fbs/mgmtd/MgmtdTypes.h" #include "storage/service/Components.h" namespace hf3fs::storage { SyncMetaKvWor...
#pragma once #include <atomic> #include <condition_variable> #include <folly/executors/CPUThreadPoolExecutor.h> #include <mutex> #include "storage/service/TargetMap.h" namespace hf3fs::storage { struct Components; class SyncMetaKvWorker { public: class Config : public ConfigBase<Config> { CONFIG_HOT_UPDATED...