v.20.7Improvement

Fix data race in lgamma function detected by tsan

Fix data race in lgamma function. This race was caught only in tsan, no side effects really happened. #13842 (Nikolai Kochetov).
Fixed a data race condition in the lgamma function detected by ThreadSanitizer (tsan), ensuring thread safety.

Why it matters

This fix addresses a concurrency issue in the lgamma function that, while not causing any known side effects, was identified by tsan. Resolving this data race improves the stability and correctness of multi-threaded operations involving lgamma.

How to use it

Users benefit from this fix automatically once they update to the new ClickHouse version containing this patch; no additional configuration or usage changes are required.