Skip to content

GH Issue 1504: Fix up caching issues related to archiving and restoring containers - #8008

Merged
labkey-susanh merged 1 commit into
developfrom
fb_containerArchive
Sep 2, 2026
Merged

GH Issue 1504: Fix up caching issues related to archiving and restoring containers#8008
labkey-susanh merged 1 commit into
developfrom
fb_containerArchive

Conversation

@labkey-susanh

Copy link
Copy Markdown
Contributor

Rationale

Issue 1504 - Intermittent test failures point out that our management of the container cache when archiving folders is not quite right. Here we update the logic to be more like what is done when a container is deleted.

Changes

  • Add post-commit task for clearing the container cache after archiving a container


clearCache();

// GH Issue 1504: Clear again after the commit has propagated the new state to other threads and transactions. Do this in a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// GH Issue 1504: Clear again after the commit has propagated the new state to other threads and transactions. Do this in a
// GitHub Issue #1504: Clear again after the commit has propagated the new state to other threads and transactions. Do this in a

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We match both patterns for creating links, so in the interest of not spending cycles, I'm going to leave the comment as is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. I forgot that we added this pattern to the list

DATABASE_QUERY_LOCK.lock();
try
{
clearCache();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there still value to calling clearCache() up at line 917? or does this call in the commit task take care of things?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory, the previous clearCache is for in-transaction references that don't want to get the stale data. This sort of mimics what is begin done for deletion (though there it's evicting a single container tree). I don't know that anything else will be going on in this transaction so it would probably be OK either way.

@labkey-susanh
labkey-susanh merged commit 31d8b3f into develop Sep 2, 2026
11 of 12 checks passed
@labkey-susanh
labkey-susanh deleted the fb_containerArchive branch September 2, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants