Loading include/config.hpp +12 −1 Original line number Diff line number Diff line Loading @@ -24,12 +24,23 @@ namespace gkfs::config { constexpr auto hostfile_path = "./gkfs_hosts.txt"; constexpr auto forwarding_file_path = "./gkfs_forwarding.map"; /* * Enables adding/removing daemons to the running file system and * switches distribution function to Random Slicing. * switches distribution algorithm to Random Slicing. */ constexpr auto dynamic_placement = true; /* * Only effective with dynamic_placement = true: * Trigger reconfiguration and relocation after regular daemon startup. Useful * for CI runs. Each newly started daemon automatically adds itself to the * cluster. * TODO: Also relocate during extra graceful shutdown. (i.e. remove myself from * cluster) */ constexpr auto auto_relocate = true; namespace io { /* * Zero buffer before read. This is relevant if sparse files are used. Loading src/daemon/daemon.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -631,6 +631,10 @@ main(int argc, const char* argv[]) { signal(SIGTERM, shutdown_handler); signal(SIGKILL, shutdown_handler); if(gkfs::config::dynamic_placement && gkfs::config::auto_relocate) { auto trigger_hosts = gkfs::relocation::calculate_random_slicing(); gkfs::relocation::do_relocation(trigger_hosts); } unique_lock<mutex> lk(mtx); // Wait for shutdown signal to initiate shutdown protocols Loading Loading
include/config.hpp +12 −1 Original line number Diff line number Diff line Loading @@ -24,12 +24,23 @@ namespace gkfs::config { constexpr auto hostfile_path = "./gkfs_hosts.txt"; constexpr auto forwarding_file_path = "./gkfs_forwarding.map"; /* * Enables adding/removing daemons to the running file system and * switches distribution function to Random Slicing. * switches distribution algorithm to Random Slicing. */ constexpr auto dynamic_placement = true; /* * Only effective with dynamic_placement = true: * Trigger reconfiguration and relocation after regular daemon startup. Useful * for CI runs. Each newly started daemon automatically adds itself to the * cluster. * TODO: Also relocate during extra graceful shutdown. (i.e. remove myself from * cluster) */ constexpr auto auto_relocate = true; namespace io { /* * Zero buffer before read. This is relevant if sparse files are used. Loading
src/daemon/daemon.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -631,6 +631,10 @@ main(int argc, const char* argv[]) { signal(SIGTERM, shutdown_handler); signal(SIGKILL, shutdown_handler); if(gkfs::config::dynamic_placement && gkfs::config::auto_relocate) { auto trigger_hosts = gkfs::relocation::calculate_random_slicing(); gkfs::relocation::do_relocation(trigger_hosts); } unique_lock<mutex> lk(mtx); // Wait for shutdown signal to initiate shutdown protocols Loading