Function gkfs::rpc::forward_remove(const std::string&, bool, const int8_t)

Function Documentation

int gkfs::rpc::forward_remove(const std::string &path, bool rm_dir, const int8_t num_copies)

Send an RPC for a remove request. This removes metadata and all data chunks possible distributed across many daemons. Optimizations are in place for small files (file_size / chunk_size) < number_of_daemons where no broadcast to all daemons is used to remove all chunks. Otherwise, a broadcast to all daemons is used.

This function only attempts data removal if data exists (determined when metadata is removed)

Parameters:
  • path

  • num_copies – Replication scenarios with many replicas

Returns:

error code