You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/28 18:31:23 UTC

[GitHub] [arrow] westonpace commented on a diff in pull request #13019: ARROW-16390: [C++] Dataset initialization could segfault if called simultaneously

westonpace commented on code in PR #13019:
URL: https://github.com/apache/arrow/pull/13019#discussion_r861202479


##########
cpp/src/arrow/dataset/plan.cc:
##########
@@ -21,17 +21,21 @@
 #include "arrow/dataset/file_base.h"
 #include "arrow/dataset/scanner.h"
 
+#include <mutex>
+
 namespace arrow {
 namespace dataset {
 namespace internal {
 
 void Initialize() {
-  static auto registry = compute::default_exec_factory_registry();
-  if (registry) {
-    InitializeScanner(registry);
-    InitializeDatasetWriter(registry);
-    registry = nullptr;

Review Comment:
   I think that was the old way of implementing a "call once" behavior.  Future calls wouldn't go into the if branch.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org