Loading include/client/rpc/rpc_types.hpp +24 −8 Original line number Diff line number Diff line Loading @@ -2280,8 +2280,9 @@ struct get_dirents { hermes::detail::post_to_mercury(ExecutionContext*); public: input(const std::string& path, const hermes::exposed_memory& buffers) : m_path(path), m_buffers(buffers) {} input(const std::string& path, const hermes::exposed_memory& buffers, const std::string& start_key = "") : m_path(path), m_buffers(buffers), m_start_key(start_key) {} input(input&& rhs) = default; Loading @@ -2303,17 +2304,24 @@ struct get_dirents { return m_buffers; } std::string start_key() const { return m_start_key; } explicit input(const rpc_get_dirents_in_t& other) : m_path(other.path), m_buffers(other.bulk_handle) {} : m_path(other.path), m_buffers(other.bulk_handle), m_start_key(other.start_key) {} explicit operator rpc_get_dirents_in_t() { return {m_path.c_str(), hg_bulk_t(m_buffers)}; return {m_path.c_str(), m_start_key.c_str(), hg_bulk_t(m_buffers)}; } private: std::string m_path; hermes::exposed_memory m_buffers; std::string m_start_key; }; class output { Loading Loading @@ -2405,8 +2413,9 @@ struct get_dirents_extended { hermes::detail::post_to_mercury(ExecutionContext*); public: input(const std::string& path, const hermes::exposed_memory& buffers) : m_path(path), m_buffers(buffers) {} input(const std::string& path, const hermes::exposed_memory& buffers, const std::string& start_key = "") : m_path(path), m_buffers(buffers), m_start_key(start_key) {} input(input&& rhs) = default; Loading @@ -2429,17 +2438,24 @@ struct get_dirents_extended { return m_buffers; } std::string start_key() const { return m_start_key; } explicit input(const rpc_get_dirents_in_t& other) : m_path(other.path), m_buffers(other.bulk_handle) {} : m_path(other.path), m_buffers(other.bulk_handle), m_start_key(other.start_key) {} explicit operator rpc_get_dirents_in_t() { return {m_path.c_str(), hg_bulk_t(m_buffers)}; return {m_path.c_str(), m_start_key.c_str(), hg_bulk_t(m_buffers)}; } private: std::string m_path; hermes::exposed_memory m_buffers; std::string m_start_key; }; class output { Loading include/common/rpc/rpc_types.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,8 @@ MERCURY_GEN_PROC( (hg_uint64_t) (total_chunk_size))((hg_bulk_t) (bulk_handle))) MERCURY_GEN_PROC(rpc_get_dirents_in_t, ((hg_const_string_t) (path))((hg_bulk_t) (bulk_handle))) ((hg_const_string_t) (path))((hg_const_string_t) (start_key))( (hg_bulk_t) (bulk_handle))) MERCURY_GEN_PROC(rpc_get_dirents_out_t, ((hg_int32_t) (err))((hg_size_t) (dirents_size))) Loading include/daemon/backend/metadata/db.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -177,7 +177,9 @@ public: * is true in the case the entry is a directory. */ [[nodiscard]] std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended(const std::string& dir) const; get_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const; /** Loading @@ -189,7 +191,9 @@ public: * is true in the case the entry is a directory. */ [[nodiscard]] std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended(const std::string& dir) const; get_all_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const; /** * @brief Iterate over complete database, note ONLY used for debugging and Loading include/daemon/backend/metadata/metadata_backend.hpp +16 −6 Original line number Diff line number Diff line Loading @@ -84,10 +84,14 @@ public: get_dirents(const std::string& dir) const = 0; virtual std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended(const std::string& dir) const = 0; get_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const = 0; virtual std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended(const std::string& dir) const = 0; get_all_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const = 0; virtual void* iterate_all() const = 0; Loading Loading @@ -157,13 +161,19 @@ public: } std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended(const std::string& dir) const { return static_cast<T const&>(*this).get_dirents_extended_impl(dir); get_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const { return static_cast<T const&>(*this).get_dirents_extended_impl( dir, start_key, max_entries); } std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended(const std::string& dir) const { return static_cast<T const&>(*this).get_all_dirents_extended_impl(dir); get_all_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const { return static_cast<T const&>(*this).get_all_dirents_extended_impl( dir, start_key, max_entries); } void* Loading include/daemon/backend/metadata/rocksdb_backend.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -182,11 +182,15 @@ public: * is true in the case the entry is a directory. */ std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended_impl(const std::string& dir) const; get_dirents_extended_impl(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const; std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended_impl(const std::string& root_path) const; get_all_dirents_extended_impl(const std::string& root_path, const std::string& start_key = "", size_t max_entries = 0) const; /** * Code example for iterating all entries in KV store. This is for Loading Loading
include/client/rpc/rpc_types.hpp +24 −8 Original line number Diff line number Diff line Loading @@ -2280,8 +2280,9 @@ struct get_dirents { hermes::detail::post_to_mercury(ExecutionContext*); public: input(const std::string& path, const hermes::exposed_memory& buffers) : m_path(path), m_buffers(buffers) {} input(const std::string& path, const hermes::exposed_memory& buffers, const std::string& start_key = "") : m_path(path), m_buffers(buffers), m_start_key(start_key) {} input(input&& rhs) = default; Loading @@ -2303,17 +2304,24 @@ struct get_dirents { return m_buffers; } std::string start_key() const { return m_start_key; } explicit input(const rpc_get_dirents_in_t& other) : m_path(other.path), m_buffers(other.bulk_handle) {} : m_path(other.path), m_buffers(other.bulk_handle), m_start_key(other.start_key) {} explicit operator rpc_get_dirents_in_t() { return {m_path.c_str(), hg_bulk_t(m_buffers)}; return {m_path.c_str(), m_start_key.c_str(), hg_bulk_t(m_buffers)}; } private: std::string m_path; hermes::exposed_memory m_buffers; std::string m_start_key; }; class output { Loading Loading @@ -2405,8 +2413,9 @@ struct get_dirents_extended { hermes::detail::post_to_mercury(ExecutionContext*); public: input(const std::string& path, const hermes::exposed_memory& buffers) : m_path(path), m_buffers(buffers) {} input(const std::string& path, const hermes::exposed_memory& buffers, const std::string& start_key = "") : m_path(path), m_buffers(buffers), m_start_key(start_key) {} input(input&& rhs) = default; Loading @@ -2429,17 +2438,24 @@ struct get_dirents_extended { return m_buffers; } std::string start_key() const { return m_start_key; } explicit input(const rpc_get_dirents_in_t& other) : m_path(other.path), m_buffers(other.bulk_handle) {} : m_path(other.path), m_buffers(other.bulk_handle), m_start_key(other.start_key) {} explicit operator rpc_get_dirents_in_t() { return {m_path.c_str(), hg_bulk_t(m_buffers)}; return {m_path.c_str(), m_start_key.c_str(), hg_bulk_t(m_buffers)}; } private: std::string m_path; hermes::exposed_memory m_buffers; std::string m_start_key; }; class output { Loading
include/common/rpc/rpc_types.hpp +2 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,8 @@ MERCURY_GEN_PROC( (hg_uint64_t) (total_chunk_size))((hg_bulk_t) (bulk_handle))) MERCURY_GEN_PROC(rpc_get_dirents_in_t, ((hg_const_string_t) (path))((hg_bulk_t) (bulk_handle))) ((hg_const_string_t) (path))((hg_const_string_t) (start_key))( (hg_bulk_t) (bulk_handle))) MERCURY_GEN_PROC(rpc_get_dirents_out_t, ((hg_int32_t) (err))((hg_size_t) (dirents_size))) Loading
include/daemon/backend/metadata/db.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -177,7 +177,9 @@ public: * is true in the case the entry is a directory. */ [[nodiscard]] std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended(const std::string& dir) const; get_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const; /** Loading @@ -189,7 +191,9 @@ public: * is true in the case the entry is a directory. */ [[nodiscard]] std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended(const std::string& dir) const; get_all_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const; /** * @brief Iterate over complete database, note ONLY used for debugging and Loading
include/daemon/backend/metadata/metadata_backend.hpp +16 −6 Original line number Diff line number Diff line Loading @@ -84,10 +84,14 @@ public: get_dirents(const std::string& dir) const = 0; virtual std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended(const std::string& dir) const = 0; get_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const = 0; virtual std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended(const std::string& dir) const = 0; get_all_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const = 0; virtual void* iterate_all() const = 0; Loading Loading @@ -157,13 +161,19 @@ public: } std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended(const std::string& dir) const { return static_cast<T const&>(*this).get_dirents_extended_impl(dir); get_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const { return static_cast<T const&>(*this).get_dirents_extended_impl( dir, start_key, max_entries); } std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended(const std::string& dir) const { return static_cast<T const&>(*this).get_all_dirents_extended_impl(dir); get_all_dirents_extended(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const { return static_cast<T const&>(*this).get_all_dirents_extended_impl( dir, start_key, max_entries); } void* Loading
include/daemon/backend/metadata/rocksdb_backend.hpp +6 −2 Original line number Diff line number Diff line Loading @@ -182,11 +182,15 @@ public: * is true in the case the entry is a directory. */ std::vector<std::tuple<std::string, bool, size_t, time_t>> get_dirents_extended_impl(const std::string& dir) const; get_dirents_extended_impl(const std::string& dir, const std::string& start_key = "", size_t max_entries = 0) const; std::vector<std::tuple<std::string, bool, size_t, time_t>> get_all_dirents_extended_impl(const std::string& root_path) const; get_all_dirents_extended_impl(const std::string& root_path, const std::string& start_key = "", size_t max_entries = 0) const; /** * Code example for iterating all entries in KV store. This is for Loading