Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronize on the manager in RepositoryHelper#createMemoryComposite #415

Merged
merged 1 commit into from
Dec 16, 2023

Commits on Dec 16, 2023

  1. 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
    laeubi committed Dec 16, 2023
    Configuration menu
    Copy the full SHA
    a5652b6 View commit details
    Browse the repository at this point in the history