enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
198 stars 34 forks source link

Blobstore can throw FileAlreadyExistsException #10447

Open rymsha opened 4 months ago

rymsha commented 4 months ago

With a chance of nodes to be created with exactly the same blob (and it does not already exist) - there is a race condition

if (file.exists) -> return false for both threads/instances
----------------> race is here
file.write -> both threads/instances want to write.

one of the nodes won't be created