Filesync flaw potentially solved

Post Reply
wroomwroom
Posts: 38
Joined: Wed Jul 31, 2024 5:59 pm

Filesync flaw potentially solved

Post by wroomwroom »

Background:
Sometimes when trying to sync an instance to a cluster you get error

Code: Select all

Error in getting dir metadata: /state/dir
This error is caused by linux trying to inspect the state folder on the linux file system instead of the mount.

Solution:
src/hpfs/hpfs_serve.cpp

LIne 324-328

Code: Select all

struct stat st;
if (stat(child_vpath.data(), &st) == -1)
{
LOG_ERROR << errno << ": Error in getting dir metadata: " << child_vpath;
}

replaced with

Code: Select all

const std::string child_physical_path =
    fs_mount->physical_path(HPFS_SESSION_NAME, child_vpath);

struct stat st;

if (stat(child_physical_path.c_str(), &st) == -1)
{
    LOG_ERROR << errno
              << ": Error in getting dir metadata: "
              << child_vpath
              << " physical path: "
              << child_physical_path;
}
Post Reply