Skip to content

Conversation

@labkey-jeckels
Copy link
Contributor

@labkey-jeckels labkey-jeckels commented Jan 5, 2026

Rationale

If the Container cache encounters a miss when processing a ParticipantCategoryListener, we get an exception about the state of the transaction.

Caused by: java.lang.IllegalStateException: SPID=70626 DbScope=labkey Missing expected call to close after prior commit
	at org.labkey.api.data.DbScope.createIllegalStateException(DbScope.java:275)
	at org.labkey.api.data.DbScope$TransactionImpl.commit(DbScope.java:2706)
	at org.labkey.api.data.ContainerManager.getForId(ContainerManager.java:1158)
	at org.labkey.study.dataset.DatasetSnapshotProvider.categoryUpdated(DatasetSnapshotProvider.java:633)
	at org.labkey.study.model.ParticipantGroupManager.fireUpdateCategory(ParticipantGroupManager.java:1138)
	at org.labkey.study.model.ParticipantGroupManager.setParticipantCategory(ParticipantGroupManager.java:522)

https://teamcity.labkey.org/buildConfiguration/LabKey_Trunk_LabkeyPremiumTrunk_GitModules_ModuleEditorPostgres/3790079?buildTab=tests&status=failed&name=UploadModuleTest.testModuleEditorRequiredDevMode&expandedTest=build%3A%28id%3A3790079%29%2Cid%3A2000000001

Changes

  • Move listeners out of the primary transaction
  • Simplify error handling, since there's only a single listener implementation

Tasks 📍

  • Manual Testing - N/A
  • Needs Automation - N/A

@labkey-jeckels labkey-jeckels merged commit b0c8b8e into develop Jan 7, 2026
12 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_categoryListener branch January 7, 2026 00:19
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.

3 participants