Skip to content

Disable LabKey caching of ResultSet by default#7711

Open
labkey-jeckels wants to merge 6 commits into
developfrom
fb_disableCacheByDefault
Open

Disable LabKey caching of ResultSet by default#7711
labkey-jeckels wants to merge 6 commits into
developfrom
fb_disableCacheByDefault

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

@labkey-jeckels labkey-jeckels commented Jun 2, 2026

Rationale

We don't want to cache more than we need to. We just disabled Postgres JDBC caching for QueryService.getSelectBuilder() scenarios. Most scenarios shouldn't need a LabKey cache either.

Changes

  • Stop using CachedResultSet by default
  • Opt in to caching when needed
  • Tests for result set scrollability
  • Improve generics
  • Migrate remaining QueryService.select() and QueryService.selector() methods to QueryService.getSelectBuilder()

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation

@labkey-jeckels labkey-jeckels self-assigned this Jun 2, 2026
@labkey-jeckels
Copy link
Copy Markdown
Contributor Author

QueryHelper funnels every select through SelectBuilder.select(), whose default flipped to an uncached, streaming result set on this branch. Many QueryHelper callers (15 files across wnprc-modules, ehrModules, OConnorLabModules, and premiumModules) rely on the cached result set's full API — particularly getRowMap(), which a streaming result set does not support. In wnprc-modules' SimpleQuery the resulting UnsupportedOperationException is swallowed and surfaces as an empty result, causing WNPRC_EHRTest's consistent "Account acct103 not found in aliases table" setup failure on this branch. Request a cached result set explicitly to preserve the helper's longstanding semantics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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