text
stringlengths
1
24.5M
#pragma once #include "common/monitor/Sample.h" #include "common/serde/Serde.h" #include "common/serde/Service.h" namespace hf3fs::monitor { struct MonitorCollectorRsp { SERDE_STRUCT_FIELD(dummy, Void{}); }; SERDE_SERVICE(MonitorCollector, 194) { SERDE_SERVICE_METHOD(write, 1, std::vector<Sample>, MonitorCollecto...
#pragma once #include "common/serde/Serde.h" #include "common/serde/Service.h" namespace hf3fs::simple_example { struct SimpleExampleReq { SERDE_STRUCT_FIELD(message, String{}); }; struct SimpleExampleRsp { SERDE_STRUCT_FIELD(message, String{}); }; SERDE_SERVICE(SimpleExampleSerde, 0xF0) { SERDE_SERVICE_METHOD...
#include "fbs/storage/Common.h" #include <fmt/format.h> #include "common/utils/Result.h" #include "scn/tuple_return/tuple_return.h" namespace hf3fs::storage { ChunkId::ChunkId(uint64_t high, uint64_t low) { data_.resize(sizeof(high) + sizeof(low)); if constexpr (std::endian::native == std::endian::little) { ...
#pragma once #include <array> #include <bit> #include <cstdint> #include <folly/hash/Checksum.h> #include <iterator> #include <string> #include <vector> #include "client/mgmtd/RoutingInfo.h" #include "common/app/ClientId.h" #include "common/net/ib/RDMABuf.h" #include "common/utils/Reflection.h" #include "common/utils...
#pragma once #include "common/serde/Service.h" #include "fbs/storage/Common.h" namespace hf3fs::storage { SERDE_SERVICE(StorageSerde, 3) { SERDE_SERVICE_METHOD(batchRead, 1, BatchReadReq, BatchReadRsp); SERDE_SERVICE_METHOD(write, 2, WriteReq, WriteRsp); SERDE_SERVICE_METHOD(update, 3, UpdateReq, UpdateRsp); ...
/* * error_definitions.h * * This source file is part of the FoundationDB open source project * * Copyright 2013-2022 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ...
#include "FDB.h" #include <atomic> #include <folly/CancellationToken.h> #include <folly/Likely.h> #include <folly/experimental/coro/Baton.h> #include <folly/experimental/coro/CurrentExecutor.h> #include <folly/experimental/coro/DetachOnCancel.h> #include <folly/logging/xlog.h> #include "foundationdb/fdb_c_types.h" n...
#pragma once #include <folly/Utility.h> #include <folly/experimental/coro/FutureUtil.h> #include <folly/experimental/coro/Promise.h> #include <folly/experimental/coro/Task.h> #include "common/kv/ITransaction.h" #include "common/utils/String.h" #include "foundationdb/fdb_c_options.g.h" #include "foundationdb/fdb_c_typ...
#pragma once #include <map> #include <string> #include "common/utils/ConfigBase.h" namespace hf3fs::kv::fdb { struct FDBConfig : public ConfigBase<FDBConfig> { CONFIG_ITEM(clusterFile, ""); CONFIG_ITEM(enableMultipleClient, false); CONFIG_ITEM(externalClientDir, ""); CONFIG_ITEM(externalClientPath, ""); CO...
#include "FDBContext.h" #include <fmt/core.h> #include <folly/logging/xlog.h> #include <memory> #include "common/utils/String.h" #include "foundationdb/fdb_c_options.g.h" namespace hf3fs::kv::fdb { #define CHECK_FDB_COND(condition, ...) XLOGF_IF(FATAL, !(condition), "FoundationDB error. " __VA_ARGS__) #define CHEC...
#pragma once #include <memory> #include "FDB.h" #include "FDBConfig.h" #include "common/utils/ConfigBase.h" namespace hf3fs::kv::fdb { // FDBContext encapsulates the setup and cleanup of FoundationDB. // It is designed to be used in the main function. class FDBContext { public: static std::shared_ptr<FDBContext> ...
#pragma once #include <folly/Likely.h> #include <gtest/gtest_prod.h> #include "FDB.h" #include "FDBTransaction.h" #include "common/kv/IKVEngine.h" namespace hf3fs { namespace meta { template <typename KV> class MetaTestBase; } namespace kv { class FDBKVEngine : public IKVEngine { public: FDBKVEngine(fdb::DB db)...
#pragma once #include <algorithm> #include <chrono> #include <folly/Likely.h> #include <folly/Random.h> #include <folly/experimental/coro/Sleep.h> #include <folly/experimental/symbolizer/Symbolizer.h> #include <folly/logging/xlog.h> #include <foundationdb/fdb_c_types.h> #include <string_view> #include <utility> #incl...
#include "FDBTransaction.h" #include <atomic> #include <cassert> #include <chrono> #include <cstdint> #include <cstring> #include <folly/Likely.h> #include <folly/Portability.h> #include <folly/Random.h> #include <folly/experimental/coro/Sleep.h> #include <folly/futures/detail/Types.h> #include <folly/lang/Bits.h> #in...
#pragma once #include <cstdint> #include <optional> #include <string_view> #include "common/kv/ITransaction.h" #include "common/utils/Coroutine.h" #include "common/utils/Status.h" #include "fdb/FDB.h" namespace hf3fs::kv { class FDBTransaction : public IReadWriteTransaction { public: FDBTransaction(fdb::Transact...
#include "HybridKvEngine.h" #include <folly/Random.h> #include "FDBContext.h" #include "FDBKVEngine.h" #include "HybridKvEngineConfig.h" #include "common/kv/mem/MemKVEngine.h" namespace hf3fs::kv { HybridKvEngine::HybridKvEngine() = default; HybridKvEngine::~HybridKvEngine() = default; std::shared_ptr<HybridKvEngin...
#pragma once #include "common/kv/IKVEngine.h" namespace hf3fs::kv::fdb { struct FDBConfig; class FDBContext; } // namespace hf3fs::kv::fdb namespace hf3fs::kv { struct HybridKvEngineConfig; class HybridKvEngine : public kv::IKVEngine { public: static std::shared_ptr<HybridKvEngine> fromMem(); static std::share...
#pragma once #include "FDBConfig.h" namespace hf3fs::kv { struct HybridKvEngineConfig : public ConfigBase<HybridKvEngineConfig> { bool operator==(const HybridKvEngineConfig &other) const { return static_cast<const ConfigBase &>(*this) == other; } CONFIG_ITEM(use_memkv, false); CONFIG_OBJ(fdb, kv::fdb::FDBConfi...
#include "FuseAppConfig.h" #include "common/app/ApplicationBase.h" namespace hf3fs::fuse { void FuseAppConfig::init(const String &filePath, bool dump, const std::vector<config::KeyValue> &updates) { auto res = ApplicationBase::initConfig(*this, filePath, dump, updates); XLOGF_IF(FATAL, !res, "Init app config fail...
#pragma once #include "common/app/NodeId.h" #include "common/net/ib/IBDevice.h" #include "common/utils/ConfigBase.h" namespace hf3fs::fuse { struct FuseAppConfig : public ConfigBase<FuseAppConfig> { public: using Base = ConfigBase<FuseAppConfig>; using Base::init; void init(const String &filePath, bool dump, ...
#ifdef ENABLE_FUSE_APPLICATION #include "FuseApplication.h" #include "FuseMainLoop.h" #include "FuseOps.h" #include "common/app/Thread.h" #include "common/app/Utils.h" DECLARE_string(cfg); DECLARE_bool(dump_default_cfg); DECLARE_bool(use_local_cfg); namespace hf3fs::fuse { struct FuseApplication::Impl { Result<V...
#pragma once #ifdef ENABLE_FUSE_APPLICATION #include "FuseAppConfig.h" #include "FuseConfig.h" #include "FuseConfigFetcher.h" #include "FuseLauncherConfig.h" #include "common/app/ApplicationBase.h" #include "core/app/ServerLauncher.h" namespace hf3fs::fuse { class FuseApplication : public ApplicationBase { public: ...
#include "FuseClients.h" #include <folly/Random.h> #include <folly/ScopeGuard.h> #include <folly/executors/IOThreadPoolExecutor.h> #include <folly/experimental/coro/BlockingWait.h> #include <folly/functional/Partial.h> #include <folly/logging/xlog.h> #include <fuse3/fuse_lowlevel.h> #include <memory> #include <thread>...
#pragma once #include <algorithm> #include <atomic> #include <cstddef> #include <cstdint> #include <folly/MPMCQueue.h> #include <folly/Math.h> #include <folly/Synchronized.h> #include <folly/Utility.h> #include <folly/executors/IOThreadPoolExecutor.h> #include <folly/experimental/coro/Mutex.h> #include <folly/fibers/S...
#pragma once #include "client/meta/MetaClient.h" #include "client/mgmtd/MgmtdClientForClient.h" #include "client/storage/StorageClient.h" #include "common/app/ApplicationBase.h" #include "common/utils/ConfigBase.h" #include "common/utils/CoroutinesPool.h" namespace hf3fs::fuse { struct FuseConfig : public ConfigBase<...
#include "FuseConfigFetcher.h" #include <folly/experimental/coro/BlockingWait.h> #include "common/utils/SysResource.h" namespace hf3fs::fuse { Result<Void> FuseConfigFetcher::completeAppInfo(flat::AppInfo &appInfo [[maybe_unused]]) { auto hostnameRes = SysResource::hostname(/*physicalMachineName=*/true); RETURN_...
#pragma once #include "core/app/MgmtdClientFetcher.h" namespace hf3fs::fuse { struct FuseConfigFetcher : public core::launcher::MgmtdClientFetcher { using core::launcher::MgmtdClientFetcher::MgmtdClientFetcher; Result<Void> completeAppInfo(flat::AppInfo &appInfo) final; }; } // namespace hf3fs::fuse
#include "FuseLauncherConfig.h" #include "common/app/ApplicationBase.h" #include "common/app/Utils.h" namespace hf3fs::fuse { void FuseLauncherConfig::init(const String &filePath, bool dump, const std::vector<config::KeyValue> &updates) { app_detail::initConfigFromFile(*this, filePath, dump, updates); } } // names...
#pragma once #include "client/mgmtd/MgmtdClientForClient.h" #include "common/app/NodeId.h" #include "common/net/Client.h" #include "common/utils/ConfigBase.h" namespace hf3fs::fuse { struct FuseLauncherConfig : public ConfigBase<FuseLauncherConfig> { CONFIG_ITEM(cluster_id, ""); CONFIG_OBJ(ib_devices, net::IBDevi...
#include "FuseMainLoop.h" #include <folly/ScopeGuard.h> #include <folly/logging/xlog.h> #include "FuseOps.h" namespace hf3fs::fuse { int fuseMainLoop(const String &programName, bool allowOther, const String &mountpoint, size_t maxbufsize, const Stri...
#pragma once #include "common/utils/String.h" namespace hf3fs::fuse { int fuseMainLoop(const String &programName, bool allowOther, const String &mountpoint, size_t maxbufsize, const String &clusterId); }
#include "FuseOps.h" #include <algorithm> #include <asm-generic/errno-base.h> #include <asm-generic/errno.h> #include <cassert> #include <cstdint> #include <cstring> #include <folly/Range.h> #include <folly/ScopeGuard.h> #include <folly/String.h> #include <folly/Utility.h> #include <folly/experimental/coro/BlockingWai...
#pragma once #include "FuseClients.h" namespace hf3fs::fuse { FuseClients &getFuseClientsInstance(); const fuse_lowlevel_ops &getFuseOps(); } // namespace hf3fs::fuse
#ifdef ENABLE_FUSE_APPLICATION #include "FuseApplication.h" int main(int argc, char *argv[]) { gflags::AllowCommandLineReparsing(); using namespace hf3fs; return fuse::FuseApplication().run(argc, argv); } #else #include <folly/ScopeGuard.h> #include "FuseConfig.h" #include "FuseMainLoop.h" #include "FuseOps.h"...
#include "IoRing.h" #include <optional> #include <type_traits> #include <utility> #include "PioV.h" #include "common/utils/UtcTime.h" #include "fbs/meta/Schema.h" #include "fuse/FuseClients.h" #include "fuse/FuseOps.h" #include "lib/api/hf3fs_usrbio.h" namespace hf3fs::fuse { std::vector<IoRingJob> IoRing::jobsToPro...
#pragma once #include <cstdint> #include <semaphore.h> #include "IovTable.h" #include "UserConfig.h" #include "client/storage/StorageClient.h" #include "common/utils/AtomicSharedPtrTable.h" #include "common/utils/Coroutine.h" #include "common/utils/Uuid.h" #include "fbs/meta/Schema.h" #include "lib/common/Shm.h" nam...
#include "IovTable.h" #include <folly/experimental/coro/BlockingWait.h> #include "IoRing.h" #include "fbs/meta/Common.h" namespace hf3fs::fuse { using hf3fs::lib::IorAttrs; const Path linkPref = "/dev/shm"; void IovTable::init(const Path &mount, int cap) { mountName = mount.native(); iovs = std::make_unique<A...
#pragma once #include <string> #include "common/utils/AtomicSharedPtrTable.h" #include "fbs/meta/Schema.h" #include "lib/common/Shm.h" namespace hf3fs::fuse { class IovTable { public: IovTable() = default; void init(const Path &mount, int cap); Result<std::pair<meta::Inode, std::shared_ptr<lib::ShmBuf>>> addI...
#include "PioV.h" namespace hf3fs::lib::agent { PioV::PioV(storage::client::StorageClient &storageClient, int chunkSizeLim, std::vector<ssize_t> &res) : storageClient_(storageClient), chunkSizeLim_(chunkSizeLim), res_(res) { auto &mgmtdClient = storageClient_.getMgmtdClient(); auto routingInfo = mg...
#pragma once #include <functional> #include "client/meta/MetaClient.h" #include "client/storage/StorageClient.h" #include "common/utils/Result.h" namespace hf3fs::lib::agent { using flat::UserInfo; class PioV { public: PioV(storage::client::StorageClient &storageClient, int chunkSizeLim, std::vector<ssize_t> &res...
#include "UserConfig.h" #include "fbs/meta/Common.h" namespace hf3fs::fuse { void UserConfig::init(FuseConfig &config) { config_ = &config; configs_.reset(new AtomicSharedPtrTable<LocalConfig>(config.max_uid() + 1)); storageMaxConcXmit_ = config.storage().net_client().rdma_control().max_concurrent_transmission...
#pragma once #include "FuseConfig.h" #include "common/utils/AtomicSharedPtrTable.h" #include "fbs/meta/Common.h" #include "fbs/meta/Schema.h" namespace hf3fs::fuse { class UserConfig { public: UserConfig() = default; void init(FuseConfig &config); Result<meta::Inode> setConfig(const char *key, const char *val,...
#include "kv/KVStore.h" #include "common/utils/StringUtils.h" #include "kv/LevelDBStore.h" #include "kv/MemDBStore.h" #include "kv/RocksDBStore.h" namespace hf3fs::kv { std::unique_ptr<KVStore> KVStore::create(const Config &config, const Options &options) { switch (options.type) { case Type::LevelDB: ret...
#pragma once #include <rocksdb/options.h> #include <rocksdb/table.h> #include <string> #include <string_view> #include "common/serde/Serde.h" #include "common/utils/ConfigBase.h" #include "common/utils/Duration.h" #include "common/utils/Path.h" #include "common/utils/Result.h" #include "common/utils/Size.h" namespac...
#include "LevelDBLogger.h" #include <folly/logging/xlog.h> namespace hf3fs::kv { LevelDBLogger::~LevelDBLogger() = default; void LevelDBLogger::Logv(const char *format, std::va_list ap) { static constexpr int fixedBufferSize = 1024; thread_local char fixedBuffer[fixedBufferSize]; // ap can only be used once,...
#pragma once #include "leveldb/env.h" namespace hf3fs::kv { class LevelDBLogger final : public leveldb::Logger { public: LevelDBLogger() = default; ~LevelDBLogger() final; void Logv(const char *format, std::va_list ap) final; }; } // namespace hf3fs::kv
#include "kv/LevelDBStore.h" #include <folly/logging/xlog.h> #include <utility> #include <variant> #include "common/utils/ObjectPool.h" #include "common/utils/Size.h" #include "leveldb/cache.h" #include "leveldb/iterator.h" #include "leveldb/options.h" #include "leveldb/slice.h" #include "leveldb/status.h" #include "...
#pragma once #include <folly/ThreadLocal.h> #include <leveldb/cache.h> #include <leveldb/db.h> #include <leveldb/write_batch.h> #include "LevelDBLogger.h" #include "kv/KVStore.h" namespace hf3fs::kv { class LevelDBStore : public KVStore { public: LevelDBStore(const Config &config) : config_(config) {} /...
#pragma once #include <map> #include <mutex> #include "kv/KVStore.h" namespace hf3fs::kv { class MemDBStore : public KVStore { public: MemDBStore(const Config &config) : config_(config) {} // get value corresponding to key. Result<std::string> get(std::string_view key) final { auto lock = std::uni...
#include "kv/RocksDBStore.h" #include <folly/logging/xlog.h> #include <rocksdb/filter_policy.h> #include <rocksdb/slice.h> #include <rocksdb/slice_transform.h> #include <rocksdb/status.h> #include <rocksdb/write_batch.h> #include <variant> #include "common/utils/ObjectPool.h" #include "common/utils/Size.h" namespace...
#pragma once #include <folly/ThreadLocal.h> #include <rocksdb/db.h> #include <rocksdb/write_batch.h> #include "kv/KVStore.h" namespace hf3fs::kv { class RocksDBStore : public KVStore { public: RocksDBStore(const Config &config) : config_(config) {} // get value corresponding to key. Result<std::string...
#pragma once #include <asm-generic/ioctl.h> #include <cstdint> #include <linux/limits.h> #include <sys/ioctl.h> #include <sys/types.h> namespace hf3fs::lib::fuse { #define HF3FS_IOCTYPE_ID 'h' #define HF3FS_IOCTL_PUNCH_HOLE_MAX 1000 struct Hf3fsIoctlGetMountNameArg { char str[32]; }; struct Hf3fsIoctlHardlinkArg...
#pragma once #include <dirent.h> #include <memory> #include <optional> #include <string> #include <sys/stat.h> #include <sys/vfs.h> #include "hf3fs_expected.h" #define HF3FS_SUPER_MAGIC 0x8f3f5fff // hf3fs fff namespace hf3fs::lib { template <typename T> using Result = nonstd::expected<T, std::pair<int, std::stri...
// This version targets C++11 and later. // // Copyright (C) 2016-2020 Martin Moene. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // expected lite is based on: // A proposal to add a utility class to represen...
#pragma once #ifdef __cplusplus extern "C" { #endif #include <stdbool.h> #include <stdint.h> #include <sys/types.h> #define HF3FS_SUPER_MAGIC 0x8f3f5fff // hf3fs fff typedef void *hf3fs_iov_handle; // for data src/dst when writing to/reading from hf3fs storage // also as the base buffer for ior // however, if you...
#include <cstdint> #include <fcntl.h> #include <fmt/format.h> #include <folly/logging/xlog.h> #include <folly/ScopeGuard.h> #include <iostream> #include <numa.h> #include <sys/stat.h> #include "common/logging/LogInit.h" #include "common/utils/Duration.h" #include "common/utils/Path.h" #include "fuse/IoRing.h" #include...
#pragma once namespace hf3fs::lib::agent { static const char *varTmpPath = "/var/tmp/hf3fs_client_agent"; }
#pragma once #include <folly/concurrency/AtomicSharedPtr.h> #include <memory> #include <ranges> #include <shared_mutex> #include <vector> #include "common/utils/Result.h" #include "common/utils/RobinHood.h" namespace hf3fs::lib { template <typename T, uint32_t KeyError, uint32_t OverflowError> class PerProcTable { ...
#include "Shm.h" #include <fcntl.h> #include <folly/experimental/coro/BlockingWait.h> #include <numa.h> #include <sys/mman.h> #include <unistd.h> namespace hf3fs::lib { ShmBuf::ShmBuf(const Path &p, size_t sz, size_t bsz, int numa, meta::Uid u, int pr, int pp) : path(p), size(sz), blockSize(bsz ? bsz ...
#pragma once #include <forward_list> #include <shared_mutex> #include "PerProcTable.h" #include "client/storage/StorageClient.h" #include "common/utils/Path.h" #include "fbs/meta/Schema.h" namespace hf3fs::lib { struct IorAttrs { int priority = 1; Duration timeout{Duration::zero()}; uint64_t flags = 0; }; st...
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <stdexcept> #include "lib/api/Client.h" namespace hl = hf3fs::lib; namespace py = pybind11; using py_iovec = std::tuple<hl::iovec, int, off_t>; struct OSException { int errcode; std::string filename; }; template <typename T> static std::conditio...
#include <chrono> #include <ctime> #include <fcntl.h> #include <filesystem> #include <fmt/format.h> #include <pybind11/chrono.h> #include <pybind11/pybind11.h> #include <pybind11/pytypes.h> #include <pybind11/stl.h> #include <stdexcept> #include "common/utils/Uuid.h" #include "lib/api/fuse.h" #include "lib/api/hf3fs_u...
#include "AllocatedMemoryCounter.h" #include <algorithm> #include <climits> #include <cstddef> #include <folly/system/ThreadName.h> #include "common/monitor/Recorder.h" namespace hf3fs::memory { using AllocatedMemoryCountRecorder = monitor::CountRecorderWithTLSTag<monitor::AllocatedMemoryCounterTag>; static Alloca...
#pragma once #include <algorithm> #include <climits> #include <cstddef> #include "common/monitor/Recorder.h" namespace hf3fs::memory { class AllocatedMemoryCounter { public: AllocatedMemoryCounter(); ~AllocatedMemoryCounter(); static void initialize(); static void shutdown(); void add(size_t size) { ...
#include "GlobalMemoryAllocator.h" #include <cstdio> #include <cstdlib> #include <dlfcn.h> #include <folly/logging/xlog.h> #include <mutex> #include "AllocatedMemoryCounter.h" #include "common/monitor/Monitor.h" namespace hf3fs::memory { #ifdef OVERRIDE_CXX_NEW_DELETE static std::once_flag gInitOnce; static bool g...
#pragma once #include <cerrno> #include <cstddef> #include <cstdio> #include <cstdlib> #include "MemoryAllocatorInterface.h" namespace hf3fs::memory { #ifdef OVERRIDE_CXX_NEW_DELETE void *allocate(size_t size); void deallocate(void *mem); void *memalign(size_t alignment, size_t size); void logstatus(char *buf, s...
#pragma once #include "common/utils/ConfigBase.h" namespace hf3fs::memory { struct MemoryAllocatorConfig : public ConfigBase<MemoryAllocatorConfig> { CONFIG_HOT_UPDATED_ITEM(prof_prefix, ""); CONFIG_HOT_UPDATED_ITEM(prof_active, bool{}); }; } // namespace hf3fs::memory
#pragma once #include <cstddef> #define GET_MEMORY_ALLOCATOR_FUNC_NAME "getMemoryAllocator" namespace hf3fs::memory { class MemoryAllocatorInterface { public: virtual ~MemoryAllocatorInterface() = default; virtual void *allocate(size_t size) = 0; virtual void deallocate(void *mem) = 0; virtual void *memalig...
#pragma once #include <cstdalign> #include <cstdlib> #include "GlobalMemoryAllocator.h" #ifdef OVERRIDE_CXX_NEW_DELETE // Override global new/delete with custom memory allocator. void *operator new(size_t size) { return hf3fs::memory::allocate(size); } void operator delete(void *mem) noexcept { hf3fs::memory::deal...
#include <cstdio> #include <cstdlib> #include <jemalloc/jemalloc.h> #include "memory/common/MemoryAllocatorInterface.h" namespace hf3fs::memory { class JemallocMemoryAllocator : public MemoryAllocatorInterface { public: void logstatus(char *buf, size_t size) override { size_t allocated, active, metadata, resi...
#include <cstdio> #include <cstdlib> #include "memory/common/MemoryAllocatorInterface.h" #include "mimalloc.h" namespace hf3fs::memory { class MimallocMemoryAllocator : public MemoryAllocatorInterface { public: void logstatus(char *buf, size_t size) override { size_t elapsed_msecs, user_msecs, system_msecs, c...
#include "common/app/TwoPhaseApplication.h" #include "memory/common/OverrideCppNewDelete.h" #include "meta/service/MetaServer.h" int main(int argc, char *argv[]) { using namespace hf3fs; return TwoPhaseApplication<meta::server::MetaServer>().run(argc, argv); }
#pragma once #include "analytics/StructuredTraceLog.h" #include "client/storage/StorageClient.h" #include "common/kv/TransactionRetry.h" #include "common/utils/ConfigBase.h" #include "common/utils/CoroutinesPool.h" #include "common/utils/Duration.h" #include "common/utils/PriorityCoroutinePool.h" #include "common/util...
#pragma once #include <array> #include <folly/Random.h> #include <folly/Synchronized.h> #include <folly/container/EvictingCacheMap.h> #include <optional> #include "common/monitor/Recorder.h" #include "common/utils/Duration.h" #include "common/utils/UtcTime.h" #include "fbs/meta/Common.h" #include "fbs/meta/Schema.h" ...
#pragma once #include <cstddef> #include <cstdint> #include <fmt/core.h> #include <folly/Random.h> #include <folly/Synchronized.h> #include <folly/logging/xlog.h> #include <map> #include <optional> #include <utility> #include <vector> #include "client/mgmtd/ICommonMgmtdClient.h" #include "common/utils/Coroutine.h" #i...
#include "Distributor.h" #include <algorithm> #include <array> #include <climits> #include <cstdint> #include <cstring> #include <folly/Random.h> #include <folly/experimental/coro/BlockingWait.h> #include <folly/functional/Partial.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include <strin...
#pragma once #include <atomic> #include <folly/Synchronized.h> #include <folly/logging/xlog.h> #include <map> #include <memory> #include <mutex> #include <optional> #include <regex.h> #include <string> #include <vector> #include "common/app/NodeId.h" #include "common/kv/IKVEngine.h" #include "common/kv/ITransaction.h...
#include "meta/components/FileHelper.h" #include <algorithm> #include <cassert> #include <chrono> #include <cstdint> #include <fmt/core.h> #include <folly/Likely.h> #include <folly/Math.h> #include <folly/experimental/coro/Collect.h> #include <folly/futures/Future.h> #include <folly/logging/xlog.h> #include <linux/fs....
#pragma once #include <chrono> #include <fmt/core.h> #include <folly/SharedMutex.h> #include <folly/Synchronized.h> #include <folly/experimental/coro/BlockingWait.h> #include <folly/experimental/coro/Mutex.h> #include <folly/experimental/coro/SharedMutex.h> #include <memory> #include <optional> #include <utility> #in...
#pragma once #include <folly/logging/xlog.h> #include <functional> #include <memory> #include <type_traits> #include <variant> #include "client/mgmtd/ICommonMgmtdClient.h" #include "client/mgmtd/MgmtdClientForServer.h" #include "common/app/NodeId.h" #include "common/net/Client.h" #include "common/net/RequestOptions.h...
#include "meta/components/GcManager.h" #include <algorithm> #include <cassert> #include <chrono> #include <cstdint> #include <fmt/core.h> #include <folly/Likely.h> #include <folly/Random.h> #include <folly/ScopeGuard.h> #include <folly/String.h> #include <folly/experimental/coro/BlockingWait.h> #include <folly/experim...
#pragma once #include <algorithm> #include <cassert> #include <cstdint> #include <folly/Executor.h> #include <folly/Random.h> #include <folly/Synchronized.h> #include <folly/Utility.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <folly/logging/xlog.h> #include <gtest/gtest_prod.h> #include <memory> #in...
#include "meta/components/InodeIdAllocator.h" #include <algorithm> #include <cassert> #include <chrono> #include <fmt/core.h> #include <folly/Likely.h> #include <folly/ScopeGuard.h> #include <folly/Unit.h> #include <folly/experimental/coro/CurrentExecutor.h> #include <folly/experimental/coro/Promise.h> #include <folly...
#pragma once #include <algorithm> #include <atomic> #include <chrono> #include <cstddef> #include <deque> #include <fmt/core.h> #include <folly/Executor.h> #include <folly/Likely.h> #include <folly/Range.h> #include <folly/Synchronized.h> #include <folly/ThreadLocal.h> #include <folly/Utility.h> #include <folly/experi...
#include "meta/components/SessionManager.h" #include <cassert> #include <cstdint> #include <fmt/format.h> #include <folly/experimental/coro/BlockingWait.h> #include <folly/functional/Partial.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include <set> #include <string_view> #include <utility...
#pragma once #include <cassert> #include <fmt/core.h> #include <folly/Executor.h> #include <folly/Synchronized.h> #include <folly/functional/Invoke.h> #include <folly/logging/xlog.h> #include <functional> #include <memory> #include <optional> #include <string> #include <string_view> #include <tuple> #include <utility>...
#include "meta/event/Event.h" #include <cassert> #include <folly/json.h> #include <folly/logging/Logger.h> #include <folly/logging/LoggerDB.h> #include <folly/logging/xlog.h> #include "common/utils/MagicEnum.hpp" #include "common/utils/Result.h" namespace hf3fs::meta::server { namespace { folly::Logger create("event...
#pragma once #include <algorithm> #include <cstdint> #include <folly/Utility.h> #include <folly/dynamic.h> #include <folly/hash/Checksum.h> #include <folly/json.h> #include <folly/logging/Logger.h> #include <folly/logging/xlog.h> #include <limits> #include <string_view> #include <utility> #include <vector> #include "...
#include "meta/event/Scan.h" #include <algorithm> #include <chrono> #include <fmt/format.h> #include <folly/Likely.h> #include <folly/Synchronized.h> #include <folly/experimental/coro/AsyncGenerator.h> #include <folly/experimental/coro/Collect.h> #include <folly/experimental/coro/CurrentExecutor.h> #include <folly/exp...
#pragma once #include <algorithm> #include <cmath> #include <exception> #include <fmt/core.h> #include <folly/CancellationToken.h> #include <folly/Function.h> #include <folly/MPMCQueue.h> #include <folly/concurrency/UnboundedQueue.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <folly/experimental/coro/...
#include "meta/service/MetaOperator.h" #include <algorithm> #include <cassert> #include <cmath> #include <cstdint> #include <fcntl.h> #include <fmt/core.h> #include <folly/Conv.h> #include <folly/Expected.h> #include <folly/Overload.h> #include <folly/Random.h> #include <folly/ScopeGuard.h> #include <folly/experimenta...
#pragma once #include <arrow/util/macros.h> #include <atomic> #include <folly/Likely.h> #include <folly/Utility.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <folly/experimental/coro/Baton.h> #include <folly/functional/Invoke.h> #include <folly/logging/xlog.h> #include <functional> #include <memory> #...
#pragma once #include "common/serde/CallContext.h" #include "fbs/meta/Service.h" #include "meta/service/MetaOperator.h" namespace hf3fs::meta::server { class MetaSerdeService : public serde::ServiceWrapper<MetaSerdeService, MetaSerde> { public: MetaSerdeService(MetaOperator &meta) : meta_(meta) {} #define ...
#include "meta/service/MetaServer.h" #include <folly/experimental/coro/BlockingWait.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include "common/app/ApplicationBase.h" #include "common/utils/Result.h" #include "core/service/CoreService.h" #include "fdb/HybridKvEngine.h" #include "meta/com...
#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...
#pragma once #include <algorithm> #include <cassert> #include <fmt/core.h> #include <folly/Random.h> #include <folly/Utility.h> #include <folly/executors/CPUThreadPoolExecutor.h> #include <folly/logging/xlog.h> #include <map> #include <memory> #include <unistd.h> #include "client/mgmtd/ICommonMgmtdClient.h" #include ...
#pragma once #include <cassert> #include <folly/Likely.h> #include <folly/Synchronized.h> #include <folly/Utility.h> #include <folly/experimental/coro/Baton.h> #include <folly/futures/Future.h> #include <folly/futures/Promise.h> #include <folly/io/async/Request.h> #include <folly/logging/xlog.h> #include <memory> #inc...
#include "meta/store/DirEntry.h" #include <algorithm> #include <boost/core/ignore_unused.hpp> #include <cassert> #include <fmt/core.h> #include <fmt/format.h> #include <folly/Likely.h> #include <folly/experimental/coro/Collect.h> #include <folly/experimental/coro/CurrentExecutor.h> #include <folly/functional/Partial.h...
#pragma once #include <algorithm> #include <cassert> #include <cstddef> #include <cstdint> #include <cstring> #include <ctime> #include <fmt/core.h> #include <folly/Expected.h> #include <folly/logging/xlog.h> #include <memory> #include <optional> #include <queue> #include <string> #include <string_view> #include <util...
#include "meta/store/FileSession.h" #include <algorithm> #include <optional> #include <vector> #include "common/kv/ITransaction.h" #include "common/kv/KeyPrefix.h" #include "common/serde/Serde.h" #include "common/utils/Coroutine.h" #include "common/utils/Result.h" #include "common/utils/SerDeser.h" #include "fbs/meta...