Merge pull request #55615 from ClickHouse/fix-kusto-thread-race

Fix: race condition in kusto implementation
This commit is contained in:
Alexey Milovidov 2023-10-14 04:52:37 +02:00 committed by GitHub
commit aafdd9da86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ String IParserKQLFunction::generateUniqueIdentifier()
// This particular random generator hits each number exactly once before looping over.
// Because of this, it's sufficient for queries consisting of up to 2^16 (= 65536) distinct function calls.
// Reference: https://www.pcg-random.org/using-pcg-cpp.html#insecure-generators
static pcg32_once_insecure random_generator;
static thread_local pcg32_once_insecure random_generator;
return std::to_string(random_generator());
}