Skip to content

add_to_filemap race condition #1425

@psilabs-dev

Description

@psilabs-dev

Caught by a test.

An archive can exist here:

my $cnt = 0;

But not here:

eval { $id = compute_id($file); };

triggering a die.

More generally, there's no guarantee of file existence made to compute_id (cnt loop only sleeps at most 5s, which can lead file to be deleted elsewhere). We should probably demote the error logs to warning here, or lock the resource and ensure shinobu can read the file without a delete API interfering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions