Add a helper to look up sample type row ids by name - #3193
Merged
Merged
Conversation
6 tasks done
labkey-jeckels
requested review from
a team and
labkey-danield
and removed request for
a team
September 29, 2026 14:47
labkey-tchad
approved these changes
Sep 29, 2026
labkey-jeckels
added a commit
to LabKey/platform
that referenced
this pull request
Sep 30, 2026
## Rationale Speed up imports with lookup columns by resolving each distinct lookup value once per import instead of once per row. #8020 made this change but was reverted in #8028: a cached miss let an integer key fall through to title-column matching, so a RowId could resolve to a different row whose name was that number. This version keeps the caching and leaves lookup resolution exactly as it was before #8020. On a large sample import, the per-row lookups accounted for about 1.5M queries and 17 minutes of database time. ## Related Pull Requests - LabKey/limsModules#2476 - LabKey/testAutomation#3193 ## Changes - Resolved lookups and String-keyed misses stay cached for the whole import instead of being discarded on every row - Each lookup cache is capped so a very large import can't grow it without bound - A value already typed as a primary key still never reaches name matching, as before the caching - Tests for cache retention, the cap, and that resolution behavior ## Tasks - [x] Claude Code Review - [x] Manual Testing - not needed - [x] Test Automation - [x] Check test results - [x] [Daily Postgres](https://teamcity.labkey.org/build/4194033) - [x] [Nightly SM/FM postgres](https://teamcity.labkey.org/build/4194049)
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
Adds the API helper that the cross-type sample import test needs to manufacture a rowId/name collision against the real value the server assigned, rather than a hardcoded number that collides only when the sequence cooperates
Related Pull Requests
Changes