Gemma icon indicating copy to clipboard operation
Gemma copied to clipboard

Fix query behaviour triggered by certain SecuredChild entities

Open ppavlidis opened this issue 2 years ago • 0 comments

There are some operations like ExpressionExperimentService.addFactorValues (used to assign values to continuous factors) which create FactorValues, and generate thousands of ACL SELECT queries in the process

FactorValues are SecuredChildren of ExpressionExperiments, so this.factorValueService.create( fv ) really shouldn't yield any ACL checks, but it easily generates ~5000 queries. Since this is done for each factorValue being created, it's very slow.

The fundamental issue is not just performance but what must be some underlying bug in what triggers these ACL checks, and it may affect other entities and Service methods. Each FactorValue has an ACL entry, that's fine -- it's just within a Transaction where the secure entity (ExpressionExperiment) is already being checked for permissions, not much else should be happening with respect to ACLs.

ppavlidis avatar Feb 09 '24 19:02 ppavlidis