Skip to content

Disable LabKey caching of ResultSet by default#1020

Merged
labkey-jeckels merged 4 commits into
developfrom
fb_disableCacheByDefault
Jun 6, 2026
Merged

Disable LabKey caching of ResultSet by default#1020
labkey-jeckels merged 4 commits into
developfrom
fb_disableCacheByDefault

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

Rationale

As we work to reduce OutOfMemoryError risk, we need to have places that rely on caching Results behavior opt-in. Here, it's so that we can ask the size of the result set before iterating it.

Related Pull Requests

Changes

  • Opt-in to a CachedResultSet

@labkey-jeckels labkey-jeckels self-assigned this Jun 2, 2026
if (settings != null)
filter.addAllClauses(settings.getFilter());
try (ResultSet rs = QueryService.get().select(table, new ArrayList<>(Arrays.asList(colRowId)), filter, null))
try (ResultSet rs = QueryService.get().getSelectBuilder(table).columns(new ArrayList<>(Arrays.asList(colRowId))).filter(filter).select())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does columns() parameter need to be mutable for some reason? Seems like unnecessary wrapping.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not. That's how it was. Removed.

@labkey-jeckels labkey-jeckels merged commit 2242ed6 into develop Jun 6, 2026
6 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_disableCacheByDefault branch June 6, 2026 16:06
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.

2 participants