Commit 288f4167 authored by Phoebe Buckheister's avatar Phoebe Buckheister 🦎 Committed by Christian Mohrbacher

meta: don't queue modsync event for failed open(.., O_CREAT | O_EXCL)

when two clients simultaneously send a LookupIntentMsg with intent
create-exclusive, one of the creates must obviously fail. modsync must
not attempt to sync any file created by the failed attempt, but it
unfortunately did.

(cherry picked from commit 3a62d88d4f5b5087b20e5425317d82474d400277)
parent b914a864
......@@ -861,7 +861,7 @@ FhgfsOpsErr DirEntry::storeInitialDirEntry(const std::string& dirEntryPath)
std::string namePath = dirEntryPath + '/' + this->name;
FhgfsOpsErr result = this->storeInitialDirEntryName(logContext, idPath, namePath, isDir);
if (getIsBuddyMirrored())
if (result == FhgfsOpsErr_SUCCESS && getIsBuddyMirrored())
if (auto* resync = BuddyResyncer::getSyncChangeset())
{
if (!isDir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment