-
Notifications
You must be signed in to change notification settings - Fork 7
GitHub Issue #783: Server lockup when updating data class domain design #7332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
4586f8f
4b6a6d2
9e42f38
d1da5c7
2e3dab8
10e4700
5e8f69e
c5017f3
075770b
bbf426a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ | |
| import org.labkey.api.exp.PropertyDescriptor; | ||
| import org.labkey.api.exp.PropertyType; | ||
| import org.labkey.api.exp.TemplateInfo; | ||
| import org.labkey.api.exp.api.ExperimentService; | ||
| import org.labkey.api.exp.api.SampleTypeDomainKind; | ||
| import org.labkey.api.exp.api.StorageProvisioner; | ||
| import org.labkey.api.gwt.client.AuditBehaviorType; | ||
|
|
@@ -799,6 +800,10 @@ public static ValidationException updateDomainDescriptor(GWTDomain<? extends GWT | |
| return validationException; | ||
| } | ||
|
|
||
| var lockSchema = ExperimentService.get().getSchema(); | ||
| if (lockSchema.getScope().isTransactionActive()) | ||
| d.lockForUpdateDelete(lockSchema); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This lock is very heavy-handed. Is it possible to only acquire this if/when we know we have actual changes to the provisioned table?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That might be too late though. In this case the other transaction acquired shared lock before the current transaction perform Add column, resulting in failure to Add column, because the other transaction is also waiting for the current transaction to release write lock on exp.dataclass. What we really need I think is READ "nolock", which postgres doesn't seem to support. |
||
|
|
||
| DomainKind<?> kind = d.getDomainKind(); | ||
| ValidationException validationException = validateProperties(d, update, kind, orig, user); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this isn't from your change, but I don't understand why we're passing this as an argument. It looks like all callers are using the
expschema.