summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/json.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2023-05-12 23:42:09 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2023-05-13 10:59:16 -0400
commit4b37ded2897c3ae9384ecdd6209699a0fdc513a3 (patch)
treefced3c194d055bc97c86f6ab039f1e63f1372937 /lib/sqlalchemy/dialects/postgresql/json.py
parenteb286c15f096771dbb128acbe8fe03e94aa72f6a (diff)
downloadsqlalchemy-4b37ded2897c3ae9384ecdd6209699a0fdc513a3.tar.gz
remove "aliased class pool" caching approach
Modified the ``JoinedLoader`` implementation to use a simpler approach in one particular area where it previously used a cached structure that would be shared among threads. The rationale is to avoid a potential race condition which is suspected of being the cause of a particular crash that's been reported multiple times. The cached structure in question is still ultimately "cached" via the compiled SQL cache, so a performance degradation is not anticipated. The change also modifies the tests for None in context.secondary to ensure no None values are in this list, as this is suspected as being the immediate cause of the issue in #9777. The cached AliasedClass thing is suspected as being the origination of the cause, as under high concurrency many threads might all access that AliasedClass immediately, which seems a reasonable place that the "adapter returning None" symptom might be originating. As of yet we don't have a self-contained reproducer for the issue, some initial attempts with threads are not showing any issue. Fixes: #9777 Change-Id: I967588f280796c413e629b55b8d97d40c1164248
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/json.py')
0 files changed, 0 insertions, 0 deletions