Skip to main content

Race Conditions with Mount

Race conditions happen when multiple things interact with the same files or folders at the same time.

On Files.com, this can occur when multiple users or processes all try to access the same files at the same time. It can also occur when Remote Syncs or Automations target the same source or destination location being used by a Remote Mount.

Because these operations may happen simultaneously, or run at overlapping times, it's not possible to predict which one will run first or finish first. This can lead to missing files, failed transfers, or partial operations.

For example, if multiple users of a Remote Mount location try to act on the same files at the same time then there's a chance one of them will fail. This is especially true if one user attempts to delete or move files while another attempts to open or edit the same files. One user might try to copy a file that has already been deleted, or two users might try to delete the same file, which can result in unpredictable behavior or log errors.

Files in Remote Mounts may be in use or by another user or process on the remote system. Changing files through a Remote Mount while they are in use on the remote server causes file corruption or data loss.

Race conditions aren't always obvious. Sometimes they show up in logs as errors like "not found" or "destination already exists".

Avoiding Race Conditions

Wherever possible, avoid setting up a Remote Mount to a "working directory" where files are likely to be in use by remote processes.

Be aware that the remote system may implement file locking which prevents more than one user editing the same file at the same time.

Ready to Transform Your File Infrastructure?

Join over 4,000 organizations that trust Files.com to manage their mission-critical file flows. Start your free trial today and see why we're the #1 rated file orchestration platform.

No credit card required • 7-day free trial • Setup in minutes