Description
Environment info
- NooBaa Version: VERSION
- Platform: Kubernetes 1.14.1 | minikube 1.1.1 | OpenShift 4.1 | other: specify
in safeUnlink function (POSIX safe_unink) in fs_napi we first move the object to a temporary path then check if its version fits the inode and mtime. if the object doesn't fit we link it back to its original path. there might be an issue where if a new object was created at the original path while we validated the object for deletion, if validation fails we will fail to return the object to the original path, because a different object is already there (EEXIST). this will cause the object we didn't want to delete to be stuck in the tmp path
NOTE - need to decide how to handle this. might not be a big issue currently, because the new object would have overwritten the object we tried to delete anyways. so we will just have an object stuck in a temp path
not a problem for GPFS because linkat_gpfs is used instead
Actual behavior
Expected behavior
Steps to reproduce
- probably be able to reproduce by running put commands and delete latest version using version id concurrently
- there may be other scenarios this is a problem - need to search where safe_unlink is used