concurrent editing overwrites previous saved object content

Description

Steps to reproduce (in MIR):

  1. Open Editor

  2. Create a PI at the metadata page

  3. Save opened Editor

Actual result:

The PI is deleted from the Document (but still exists in Database). You can not create a new PI.

Expected results:

either

Solution 1: There should be a error Message when saving a modified document

  • could be achieved by comparing the modify dates, the date on the disk needs to be older or equal

  • there could also be some clever Javascript which frequently checks in the background if the modify date is still “ok” and displays a message if not.

or

Solution 2: At step 2 the creation should fail, because a editor is opened

  • could be achieved by checking if there is a lock on the document in the pi component

  • this would not prevent opening two editors (locks are only checked if foreign user has lock) and still have the “same” bug

Environment

None

Activity

Sebastian Hofmann 
March 29, 2022 at 1:07 PM

In the MyCoRe-TelKo we decided we put the Code from the Commit from the MCRUpdateObjectServlet to the MetadataManager.update() Method.

All places where the modifyDate is updated before saving need to be removed, or the update method will not work.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created March 22, 2022 at 1:23 PM
Updated June 1, 2022 at 3:58 PM
Resolved April 26, 2022 at 3:08 PM