Skip to content

Single process locking #12

Open
Open
@martinheidegger

Description

@martinheidegger

When hyperdrive-publisher gets started as github action, it may very well be possible that (by accident, misconfiguration or parallelization) the script gets started at the same time twice. As far as I can see this may cause forks in the hypercore (corrupt the data) and that is not such a good thing.

I can a few ways to mitigate this issue and I am wondering how relevant each would be.

  • Add a lock file to the file system that prevents parallel starts on a OS/process level.
  • Add a feature to the pinning host/server (in conjunction with Add target identification support #11) that prevents them to connect two two seeding pees at the same time.
  • Before syncing of the file system: connect to the dht to see if there is another peer that also possesses the secret key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions