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

Verify ConcurrentDictionary use, taking into account GetOrAdd can call creation callback more than once #31

Closed
NightOwl888 opened this issue Feb 15, 2021 · 0 comments · Fixed by #33
Labels
design up for grabs This issue is open to be worked on by anyone

Comments

@NightOwl888
Copy link
Owner

NightOwl888 commented Feb 15, 2021

See apache/lucenenet#417 for a more complete description.

This issue also applies to the GetOrCreate() method of SoftCache, which should be reviewed.

It is suspected that this may be the source of concurrency issues with ThaiTokenizer and ICUTokenizer tests of Lucene.NET, which are known to fail without extra locking that was not part of the original design.

@NightOwl888 NightOwl888 added design up for grabs This issue is open to be worked on by anyone labels Feb 15, 2021
NightOwl888 added a commit that referenced this issue Mar 9, 2021
…o a Lazy<T> to ensure two threads cannot load the cache at the same time. (fixes #31)
NightOwl888 added a commit that referenced this issue Mar 9, 2021
…<T> to ensure two threads cannot load the cache at the same time. (fixes #31)
NightOwl888 added a commit that referenced this issue Mar 9, 2021
…currentDictionary into a Lazy<T> to ensure two threads cannot load the cache at the same time. (fixes #31)
NightOwl888 added a commit that referenced this issue Mar 9, 2021
…o a Lazy<T> to ensure two threads cannot load the cache at the same time. (fixes #31)
NightOwl888 added a commit that referenced this issue Mar 9, 2021
…<T> to ensure two threads cannot load the cache at the same time. (fixes #31)
NightOwl888 added a commit that referenced this issue Mar 9, 2021
…currentDictionary into a Lazy<T> to ensure two threads cannot load the cache at the same time. (fixes #31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design up for grabs This issue is open to be worked on by anyone
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant