Commit b569dcad authored by Ramon Nou's avatar Ramon Nou Committed by Ramon Nou
Browse files

WIP - REPL

Added NUM_REPL env variable. (0 no replicas)

NUM_REPL  num replicas  (Replicas < servers)

Remove and truncate

Metadata replication - WIP

Metadata replication - Reattempt on stat

minimal compilation issues (c++20), srand for repl

Bitset

Bit set proposal (WIP)

Read - Write with bitset (<1024 chunks)

Changed bitset to vector

Added get_fs_config reattempt

Some more resilience on create

Added Replica_Check on write (disabled)

Added helper vector-bitset functions
parent f0177ac9
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -917,13 +917,9 @@ gkfs_do_write(gkfs::filemap::OpenFile& file, const char* buf, size_t count,
    write_size = ret_write.second;

    if(num_replicas > 0) {

        auto ret_write_repl = gkfs::rpc::forward_write(*path, buf, offset,
                                                       count, num_replicas);

        if(err and ret_write_repl.first == 0) {
            // We succesfully write the data to some replica
            err = ret_write_repl.first;
            // Write size will be wrong
            write_size = ret_write_repl.second;
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ namespace gkfs::rpc {
 * @param buf
 * @param append_flag
 * @param write_size
 * @param updated_metadentry_size
 * @param num_copies number of replicas
 * @return pair<error code, written size>
 */