Loading include/config.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ constexpr auto implicit_data_removal = true; // Check for existence of file metadata before create. This done on RocksDB // level constexpr auto create_exist_check = true; constexpr auto use_inline_data = false; constexpr auto use_inline_data = true; constexpr auto inline_data_size = 4096; // in bytes } // namespace metadata namespace data { Loading src/client/gkfs_functions.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -138,15 +138,18 @@ generate_lock_file(const std::string& path, bool increase) { auto lock_path = path + ".lockgekko"; if(increase) { auto md = gkfs::utils::get_metadata(lock_path); size_t new_size = 1; if(!md) { gkfs::rpc::forward_create(lock_path, 0777 | S_IFREG, 0); } else { new_size = md->size() + 1; } gkfs::rpc::forward_update_metadentry_size(lock_path, 1, 0, false, false, 0); gkfs::rpc::forward_update_metadentry_size(lock_path, new_size, 0, false, false, 0); } else { auto md = gkfs::utils::get_metadata(lock_path); if(md) { if(md.value().size() == 1) { if(md->size() == 1 || md->size() == 0) { LOG(DEBUG, "Deleting Lock file {}", lock_path); gkfs::rpc::forward_remove(lock_path, false, 0); } else { Loading Loading @@ -1361,7 +1364,7 @@ gkfs_do_read(const gkfs::filemap::OpenFile& file, char* buf, size_t count, } if(gkfs::config::metadata::use_inline_data && (offset + count) <= gkfs::config::metadata::inline_data_size) { offset < gkfs::config::metadata::inline_data_size) { // Forward the read request to the Metadata Server instead of Data // Server Loading src/daemon/handler/srv_metadata.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1168,6 +1168,8 @@ rpc_srv_read_data_inline(hg_handle_t handle) { // inline and the client should have checked, but we double check. if(md.size() > gkfs::config::metadata::inline_data_size) { out.err = EAGAIN; // Signal client to use Chunk path } else if(md.size() > 0 && md.inline_data().empty()) { out.err = EAGAIN; // Signal client to use Chunk path } else { const std::string& stored_data = md.inline_data(); Loading Loading
include/config.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ constexpr auto implicit_data_removal = true; // Check for existence of file metadata before create. This done on RocksDB // level constexpr auto create_exist_check = true; constexpr auto use_inline_data = false; constexpr auto use_inline_data = true; constexpr auto inline_data_size = 4096; // in bytes } // namespace metadata namespace data { Loading
src/client/gkfs_functions.cpp +7 −4 Original line number Diff line number Diff line Loading @@ -138,15 +138,18 @@ generate_lock_file(const std::string& path, bool increase) { auto lock_path = path + ".lockgekko"; if(increase) { auto md = gkfs::utils::get_metadata(lock_path); size_t new_size = 1; if(!md) { gkfs::rpc::forward_create(lock_path, 0777 | S_IFREG, 0); } else { new_size = md->size() + 1; } gkfs::rpc::forward_update_metadentry_size(lock_path, 1, 0, false, false, 0); gkfs::rpc::forward_update_metadentry_size(lock_path, new_size, 0, false, false, 0); } else { auto md = gkfs::utils::get_metadata(lock_path); if(md) { if(md.value().size() == 1) { if(md->size() == 1 || md->size() == 0) { LOG(DEBUG, "Deleting Lock file {}", lock_path); gkfs::rpc::forward_remove(lock_path, false, 0); } else { Loading Loading @@ -1361,7 +1364,7 @@ gkfs_do_read(const gkfs::filemap::OpenFile& file, char* buf, size_t count, } if(gkfs::config::metadata::use_inline_data && (offset + count) <= gkfs::config::metadata::inline_data_size) { offset < gkfs::config::metadata::inline_data_size) { // Forward the read request to the Metadata Server instead of Data // Server Loading
src/daemon/handler/srv_metadata.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1168,6 +1168,8 @@ rpc_srv_read_data_inline(hg_handle_t handle) { // inline and the client should have checked, but we double check. if(md.size() > gkfs::config::metadata::inline_data_size) { out.err = EAGAIN; // Signal client to use Chunk path } else if(md.size() > 0 && md.inline_data().empty()) { out.err = EAGAIN; // Signal client to use Chunk path } else { const std::string& stored_data = md.inline_data(); Loading