Re: [PR] Fix contention in StringHelper.randomId [lucene]

2024-09-21 Thread via GitHub
rmuir commented on PR #13816: URL: https://github.com/apache/lucene/pull/13816#issuecomment-2365228413 this ID is generated for safety, and we only calculate this **once per segment** when initially flushing it. Doesn't even happen at merge. Really, it should be a few insns under lock, shou

Re: [PR] Fix contention in StringHelper.randomId [lucene]

2024-09-21 Thread via GitHub
original-brownbear commented on PR #13816: URL: https://github.com/apache/lucene/pull/13816#issuecomment-2365187862 > profilers often lie about this True but here I'd say whatever number the profiler outputs is only part of the cost of hard synchronizing on a global like we do here (w

Re: [PR] Fix contention in StringHelper.randomId [lucene]

2024-09-21 Thread via GitHub
rmuir commented on PR #13816: URL: https://github.com/apache/lucene/pull/13816#issuecomment-2365147464 profilers often lie about this. I think we should keep the synchronization simple. the IDs are important to not duplicate. -- This is an automated message from the Apache Git Service. To

[PR] Fix contention in StringHelper.randomId [lucene]

2024-09-21 Thread via GitHub
original-brownbear opened a new pull request, #13816: URL: https://github.com/apache/lucene/pull/13816 Seeing this mutex contended up to O(10ms) in Elasticsearch at times. Moving to CAS and removing the unnecessary alloction of a new instance for the bitwise-and with the mask makes this per