Skip to content
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

Dataverse Optimistic Lock Exception when calling DatasetHelper.destroyAll() #291

Closed
ekraffmiller opened this issue Jan 29, 2024 · 1 comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows

Comments

@ekraffmiller
Copy link
Contributor

This error occurs in DatasetJSDataverseRepository.spec.ts when there are many Datasets in the server (for example, after running Dataset.spec.ts).

In the test "gets the total dataset count", DatasetHelper.destroyAll() fails because one of the calls to the delete API returns a 500 error:

{
    "status": "ERROR",
    "message": "Command edu.harvard.iq.dataverse.engine.command.impl.DeleteDataFileCommand@7ab8bb74 failed: Exception thrown from bean: jakarta.ejb.EJBTransactionRolledbackException: Exception thrown from bean: jakarta.persistence.OptimisticLockException: Exception [EclipseLink-5003] (Eclipse Persistence Services - 4.0.1.payara-p1.v202304041433): org.eclipse.persistence.exceptions.OptimisticLockException\nException Description: The object [edu.harvard.iq.dataverse.FileMetadata[id=1402]] cannot be deleted because it has changed or been deleted since it was last read. \nClass> edu.harvard.iq.dataverse.FileMetadata Primary Key> 1,402"
}

It is happening in this run: https://github.com/IQSS/dataverse-frontend/actions/runs/7662503764/job/20883838264

@ekraffmiller ekraffmiller added pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows labels Jan 29, 2024
@ekraffmiller
Copy link
Contributor Author

I created another issue to address this: #294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pm.GREI-d-2.7.1 NIH, yr2, aim7, task1: R&D UI modules for creating datasets and supporting publishing workflows pm.GREI-d-2.7.2 NIH, yr2, aim7, task2: Implement UI modules for creating datasets and publishing workflows
Projects
None yet
Development

No branches or pull requests

1 participant