Repository navigation
GH Issue 1941: Optionally rebuild sample type caches at startup - #8386
Open
labkey-jeckels wants to merge 4 commits into
Open
labkey-jeckels wants to merge 4 commits into
labkey-jeckels wants to merge 4 commits into
Conversation
Adds an optional feature, off by default, that materializes every sample type in the background at startup and when enabled, so the first reads of large sample types after a restart don't fall back to the slow uncached query.
A substring check failed when another indexed integer (e.g. 3041) contained the removed value 41.
TableSelector rejects Set.of() for getArrayList, so materializeAllAsync threw before queueing anything.
labkey-jeckels
commented
Nov 25, 2026
| Object tokens = last.get(SearchService.PROPERTY.identifiersMed.toString()); | ||
| assertTrue("T1's last document lost its TextField value: " + outcome, String.valueOf(tokens).contains("alpha")); | ||
| assertFalse("T1's last document kept the removed field's value: " + outcome, String.valueOf(tokens).contains("41")); | ||
| List<String> tokens = last.get(SearchService.PROPERTY.identifiersMed.toString()) instanceof List<?> list |
Contributor
Author
There was a problem hiding this comment.
@labkey-nicka FYI. This fixes an intermittent failure in the new test.
https://teamcity.labkey.org/buildConfiguration/LabKey_2611Release_Community_BvtBPostgres/4279191
labkey-jeckels
marked this pull request as ready for review
November 25, 2026 17:14
labkey-nicka
approved these changes
Nov 25, 2026
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 an opt-in setting that rebuilds the materialized sample type caches in the background at startup, so large sample types aren't slow for the first several minutes after a restart (GH Issue 1941). Today each cache is rebuilt only on its first read, one sample type at a time, and every read until then runs the uncached query; on a server with multi-million-row sample types this pushed API clients past their timeouts. The setting is off by default for 26.11.
Changes