Skip to content

Use DatabaseCache for Attachments so they work with additions and deletions inside transactions - #7984

Open
labkey-susanh wants to merge 3 commits into
developfrom
fb_attachmentDbCache
Open

Use DatabaseCache for Attachments so they work with additions and deletions inside transactions#7984
labkey-susanh wants to merge 3 commits into
developfrom
fb_attachmentDbCache

Conversation

@labkey-susanh

Copy link
Copy Markdown
Contributor

Rationale

We have seen the DeleteJobAttachmentsApiTest.testMultipleAttachments test fail intermittently for a long time now saying that there are more attachments for a job than there actually are after deletion. The problem seems to be interference from the search indexer that picks up on the job that is created with its attachments in the setup for the test and makes a request to index that job concurrently with the deletion of the attachments. The deletion operation removes the attachments from the cache, but the indexer puts them back in before the transaction is committed, and there they will remain until they expire. Using a DatabaseCache should make interactions during a transaction work better.

Changes

  • Change the AttachmentCache type

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation - not needed; uncovered by tests
  • Verify Fix - not needed; uncovered by tests

@labkey-susanh labkey-susanh self-assigned this Aug 26, 2026
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.

1 participant