Details
-
Sub-task
-
Status: Resolved
-
Blocker
-
Resolution: Fixed
-
3.2.0
-
Incompatible change
-
Description
race condition in delete/rename overlap
If you have multiple threads on a system doing rename operations, then one thread doing a delete(dest/subdir) may delete the last file under a subdir, and, before its listed and recreated any parent dir marker -other threads may conclude there's an empty dest dir and fail.
This is most likely on an overloaded system with many threads executing rename operations, as with parallel copying taking place there are many threads to schedule and https connections to pool.
failure reporting
the classic {[rename(source, dest)}} operation returns false on certain failures, which, while somewhat consistent with the posix APIs, turns out to be useless for identifying the cause of problems. Applications tend to have code which goes
if (!fs.rename(src, dest)) throw new IOException("rename failed and we don't know why");
This change modifies S3A FS To
- raise FileNotFoundException if the source is missing
- raise FileAlreadyExistsException if the destination isn't suitable for the source (source is a dir and the dest is one of: a file, a non-empty directory)
It still returns false for "no-op renames" , e.g where source == dest.
Other stores raise the same exceptions, with this change S3A moves away from consistency with HDFS to one where applications find out what is wrong.
Attachments
Issue Links
- causes
-
HBASE-25900 HBoss tests compile/failure against Hadoop 3.3.1
- Resolved
- links to