Zhuo Peng created ARROW-7510:
--------------------------------
Summary: [C++] Array::null_count() is not thread-compatible
Key: ARROW-7510
URL: https://issues.apache.org/jira/browse/ARROW-7510
Project: Apache Arrow
Issue Type: Bug
Components: C++
Reporter: Zhuo Peng
ArrayData has a mutable member null_count, that can be updated in a const
function. However null_count is not atomic, so it's subject to data race.
I guess Arrays are not thread-safe (which is reasonable), but at least they
should be thread-compatible so that concurrent access to const member functions
are fine.
(The race looks "benign", but see [1][2])
[https://github.com/apache/arrow/blob/dbe708c7527a4aa6b63df7722cd57db4e0bd2dc7/cpp/src/arrow/array.cc#L123]
[1][https://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong]
[2][https://bartoszmilewski.com/2014/10/25/dealing-with-benign-data-races-the-c-way/]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)