apache / datasketches-cpp

Core C++ Sketch Library
https://datasketches.apache.org
Apache License 2.0
225 stars 71 forks source link

random_utils is not thread-safe #349

Closed FluorineDog closed 1 year ago

FluorineDog commented 1 year ago

In our project, we use multiple kll_sketch in parallel. But it depends on random_bits: https://github.com/apache/datasketches-cpp/blob/fa0dce5180f845020ec9c6e034ee134f1f91d580/common/include/common_defs.hpp#L40-L48 which is not thread-safe, making Thread Sanitizer(TSAN) complain about data race.

I make a PR to solve this. it needs your approve to start ci. plz check it.

AlexanderSaydakov commented 1 year ago

Could you answer my questions in the pull request please? Thank you.

AlexanderSaydakov commented 1 year ago

should be fixed by #347

jmalkin commented 1 year ago

This was included in v4.1.0, which has now officially been released.