worm: when enabled, avoid renaming the existing object in tmp directory (#6560)
In XL PutObject & CompleteMultipartUpload, the existing object is renamed to the temporary directory before checking if worm is enabled or not. Most of the times, this doesn't cause an issue unless two uploads to the same location occurs at the same time. Since there is no locking in object handlers, both uploads will reach XL layer. The second client acquiring write lock in put object or complete upload in XL will rename the object to the temporary directory before doing the check and returning the error (wrong!). This commit fixes then the behavior: no rename to temporary directory if worm is enabled.master
parent
307765591d
commit
ea9408ccbb
Loading…
Reference in new issue