From 4b37ded2897c3ae9384ecdd6209699a0fdc513a3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 May 2023 23:42:09 -0400 Subject: 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 --- doc/build/changelog/unreleased_20/9777.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/build/changelog/unreleased_20/9777.rst (limited to 'doc/build') diff --git a/doc/build/changelog/unreleased_20/9777.rst b/doc/build/changelog/unreleased_20/9777.rst new file mode 100644 index 000000000..0f043f9be --- /dev/null +++ b/doc/build/changelog/unreleased_20/9777.rst @@ -0,0 +1,11 @@ +.. change:: + :tags: bug, orm + :tickets: 9777 + + 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. -- cgit v1.2.1