Unverified Commit 771867fc authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

fix concurrent metadentry creation

On metadentry creation, if the file alredy existed, we should use the
old file UUID and drop the one newly created.

WARNING: We are wasting one file UUID on each `creat` operation,
regardless if the file already existed or not.
parent 887f0710
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ static hg_return_t rpc_srv_mk_node(hg_handle_t handle) {
    try {
        // create metadentry
        create_metadentry(in.path, md);
        md = get_metadentry(in.path);
        out.err = 0;
        out.fuid = md.fuid();
    } catch (const std::exception& e) {