OptimisticLockException, possibly with several browser tabs open
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Issue created by the "entrepot.recherche.data.gouv.fr" team
What steps does it take to reproduce the issue?
The problem is difficult to reproduce
It is possible that during a publication / submission of a dataset, if a user has several browser tabs open on the same dataset (with expired sessions), the error is generated
- When does this issue occur?
When publishing / submitting a dataset
- Which page(s) does it occurs on?
View of a dataset
- What happens?
We have observed this error when updating a Dataset in the database, for example:
Or
We think this can create a problem in some cases.
For example when submitting for review, in summary, it goes like this:
-> DatasetLock "InReview" on dataset
-> Updated modification dates
-> Dataset merge
-> Send notifications to users
The problem is that in case of an "OptimisticLockException" type error, the merge is KO (dates not modified and notifications not sent) while the DatasetLock is created.
Example of Java stack trace is attached.
- To whom does it occur (all users, curators, superusers)?
connected users
- What did you expect to happen?
A handling of the "OptimisticLockException" error in the Java code in order to improve the user experience
Which version of Dataverse are you using?
5.12.1
Any related open or closed issues to this bug report?
https://groups.google.com/g/dataverse-community/c/5usS5yqMjqI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading SubmitDatasetForReviewCommand.java at lines 52-60 and PublishDatasetCommand.java at line 175, then trace the dataset lock, date update, merge, and notification sequence described in the issue. Investigate how an OptimisticLockException affects that sequence when several tabs use expired sessions. Done means the failure is handled consistently without leaving the dataset lock or user-facing workflow in a misleading state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100