[
https://issues.apache.org/jira/browse/BEAM-5206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16603781#comment-16603781
]
Ahmet Altay commented on BEAM-5206:
-----------------------------------
I remember a previous fix had some unintended consequences. [~charleschen]
might have some context on it.
> Thread local caching of GcsIO instances does not work
> -----------------------------------------------------
>
> Key: BEAM-5206
> URL: https://issues.apache.org/jira/browse/BEAM-5206
> Project: Beam
> Issue Type: Bug
> Components: sdk-py-core
> Affects Versions: 2.6.0
> Reporter: Håkon Hitland
> Assignee: Ahmet Altay
> Priority: Minor
>
> gcsio.py contains some code to cache new instances per thread:
>
> {code:java}
> local_state = threading.local()
> if getattr(local_state, 'gcsio_instance', None) is None:
> {code}
> However, since local_state is always a newly created thread-local storage,
> this property will never be set.
> To get the intended effect, a global threading.local() instance should be
> stored on the class or module level.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)