Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize on the manager in RepositoryHelper#createMemoryComposite
Currently the RepositoryHelper#createMemoryComposite uses the current time millis to generate a "unique" URI, but this has several issues: Two threads can enter the method at the same time and then see that this "unique" id is currently not taken and then get the same id. It can even happen that both try to create them at the same time, what then will result in a provision exception what will return null and results in no composite created at all. This do the following to mitigate this: - uses a UUID instead of timestamp where collisions are already unlikely - synchronize on the manager for the time of test/create the repository
- Loading branch information