LabKey / platform

A set of modules that provide core functionality for LabKey Server
Apache License 2.0
7 stars 7 forks source link

Issue 51213: Add temp tokens to prevent temp tables from disappearing before use #5959

Closed labkey-susanh closed 2 weeks ago

labkey-susanh commented 2 weeks ago

Rationale

Issue 51213 - we are seeing a good number of exception reports referencing temp tables used during computation of ancestor data. The complaint in the exception reports is that the tables needed don't exist. The theory is that these tables are getting cleaned up prematurely because the reference object used to create the TempTableTracker isn't used elsewhere and is thus seen as a candidate for garbage collection, which then will cause the temp tables to be deleted before use. We do see a lot of GC activity in our production instances, which lends credence to this theory.

This PR attaches the ref Objects used for the tracker to the relevant SQL fragments so they should stick around.

Related Pull Requests

Changes