You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "AliRana30 (via GitHub)" <gi...@apache.org> on 2026/01/30 10:23:18 UTC

[PR] GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary() [arrow]

AliRana30 opened a new pull request, #49080:
URL: https://github.com/apache/arrow/pull/49080

   ## Rationale for this change
   `DictionaryArray::dictionary()` does lazy initialization without thread synchronization, causing race conditions when multiple threads access the same instance concurrently.
   
   ## Chages 
   - Use `std::call_once` with `std::once_flag` for thread-safe lazy initialization
   - Added `#include <mutex>` 
   - Removed TODO comment at line 112


-- 
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


Re: [PR] GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary() [arrow]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #49080:
URL: https://github.com/apache/arrow/pull/49080#issuecomment-3823627939

   I think you can close the issue as there is already one. For the PR, I am not the committer in this repo so I leave it to others 👍


-- 
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


Re: [PR] GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary() [arrow]

Posted by "AliRana30 (via GitHub)" <gi...@apache.org>.
AliRana30 commented on PR #49080:
URL: https://github.com/apache/arrow/pull/49080#issuecomment-3822987665

   Thanks for catching that! You're right, this is a duplicate of #48905. Should I:
   1. Close this PR and the issue #49064 as duplicate?
   2. Or update this PR to reference both issues (GH-48905, GH-49064)?
   
   Let me know!


-- 
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


Re: [PR] GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary() [arrow]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #49080:
URL: https://github.com/apache/arrow/pull/49080#issuecomment-3822979342

   Oh actually I think this is a duplicate of https://github.com/apache/arrow/pull/48905 :-).


-- 
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


Re: [PR] GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary() [arrow]

Posted by "AliRana30 (via GitHub)" <gi...@apache.org>.
AliRana30 closed pull request #49080: GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary()
URL: https://github.com/apache/arrow/pull/49080


-- 
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


Re: [PR] GH-49064: [C++] Fix thread safety in DictionaryArray::dictionary() [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #49080:
URL: https://github.com/apache/arrow/pull/49080#issuecomment-3822978085

   :warning: GitHub issue #49064 **has been automatically assigned in GitHub** to PR creator.


-- 
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