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 refObjects used for the tracker to the relevant SQL fragments so they should stick around.
Related Pull Requests
Changes
Add some logging (may want to reduce to debug level, though)
Exit methods earlier if we don't have any work to do
Update SQLFragments with a temp token that should keep the relevant temp tables alive.
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
SQLFragments
with a temp token that should keep the relevant temp tables alive.