Commit 04577716 authored by David Auer's avatar David Auer
Browse files

Rename shuffle to relocation

parent 94c282c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
                "-r", "/dev/shm/gkfs_rootdir", "-m", "/dev/shm/gkfs_mountdir", 
                "-H", "/run/media/da/rocket1tb/gekko-localinstall/gkfs_hostfile",
                "-l", "enp0s25",
                "--shuffle",
                "--start-relocation",
            ],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
+5 −2
Original line number Diff line number Diff line
@@ -71,10 +71,13 @@ public:
    get_dirents_extended(const std::string& dir) const;

    void
    iterate_all();
    iterate_all() const;

    void
    print_all();
    print_all() const;

    std::vector<std::pair<std::string, std::string>>
    get_all() const;
};

} // namespace gkfs::metadata
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ DECLARE_MARGO_RPC_HANDLER(rpc_srv_mk_symlink)

#endif

DECLARE_MARGO_RPC_HANDLER(rpc_srv_shuffle_start)
DECLARE_MARGO_RPC_HANDLER(rpc_srv_relocation_start)


// data
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ constexpr auto get_dirents_extended = "rpc_srv_get_dirents_extended";
#ifdef HAS_SYMLINKS
constexpr auto mk_symlink = "rpc_srv_mk_symlink";
#endif
constexpr auto shuffle_start = "rpc_srv_shuffle_start";
constexpr auto relocation_start = "rpc_srv_relocation_start";
constexpr auto write = "rpc_srv_write_data";
constexpr auto read = "rpc_srv_read_data";
constexpr auto truncate = "rpc_srv_trunc_data";
+19 −3
Original line number Diff line number Diff line
@@ -308,7 +308,7 @@ MetadataDB::get_dirents_extended(const std::string& dir) const {
 * it is too expensive
 */
void
MetadataDB::iterate_all() {
MetadataDB::iterate_all() const {
    std::string key;
    std::string val;
    // Do RangeScan on parent inode
@@ -326,10 +326,9 @@ MetadataDB::iterate_all() {
 * @param options
 */
void
MetadataDB::print_all() {
MetadataDB::print_all() const {
    std::string key;
    std::string val;
    // Do RangeScan on parent inode
    auto iter = db->NewIterator(rdb::ReadOptions());
    for(iter->SeekToFirst(); iter->Valid(); iter->Next()) {
        key = iter->key().ToString();
@@ -338,6 +337,23 @@ MetadataDB::print_all() {
    }
}

std::vector<std::pair<std::string, std::string>>
MetadataDB::get_all() const {
    // replacing this with an iterator to pass down to the consumers
    // would be more space efficient

    std::vector<std::pair<std::string, std::string>> entries;
    std::string key;
    std::string val;
    auto iter = db->NewIterator(rdb::ReadOptions());
    for(iter->SeekToFirst(); iter->Valid(); iter->Next()) {
        key = iter->key().ToString();
        val = iter->value().ToString();
        entries.emplace_back(std::move(key), std::move(val));
    }
    return entries;
}

void
MetadataDB::optimize_rocksdb_options(rdb::Options& options) {
    options.max_successive_merges = 128;
Loading