Repository navigation
Kanban 2292: Route all attachments through core.AttachmentPointers - #8381
Open
labkey-adam wants to merge 8 commits into
Open
labkey-adam wants to merge 8 commits into
labkey-adam wants to merge 8 commits into
Conversation
Every attachment now gets a pointer, new uploads are deduplicated by hash, and core.Documents becomes core.Attachments with core.AttachmentPointers alongside it.
…rrent adds Migration copies each type's pointers by ParentType and filters look-and-feel files on Name; the backfill runs FileSystem last on unlabeled rows and reruns in 26.016; concurrent same-name adds raise DuplicateFilenameException.
labkey-nicka
approved these changes
Nov 26, 2026
copyAttachments now checks for duplicate names and audits each copy, like copyAttachment, which now delegates to the shared path.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale
This PR routes every attachment through
core.AttachmentPointers, so new uploads are deduplicated by content hash across the whole server. It is Phase 2, Step 2 of the unified attachment service (Kanban 2228). Existing attachments each get one pointer and aren't deduplicated yet, so the upgrade is safe on any database; background deduplication follows in Step 3.Resolves https://github.com/LabKey/kanban/issues/2292
Related Pull Requests
Changes
core.Documentstocore.Attachmentsandcore.AttachmentPointertocore.AttachmentPointers, gives every existing attachment a pointer, adds a nullable uniqueHashcolumn, and drops the columns the pointers now carryAttachmentServicereads and writes through pointers and always checks the parent's container; deletes remove only pointers, and a new maintenance task deletes content no pointer referencescore.Attachmentsandcore.AttachmentsGroupedByParentTypeTested by upgrading a clone of a development database and a 26.11 database, and by a fresh install: the attachment, notebook, and workflow junit tests pass, every pointer has a known parent type, and no orphans or container mismatches are reported. On TeamCity, every suite this branch triggers passes, including upgrade validation from 25.7 through 26.11; Biologics ELN's two failures also occur on develop.