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

Organize read/write access of multiple users/admins to shared data resources #1122

Open
MPDLbrede opened this issue Apr 1, 2019 · 4 comments

Comments

Projects
2 participants
@MPDLbrede
Copy link

commented Apr 1, 2019

In imeji a data object (i.e. collection) is read at one time from database, then manipulated in GUI over some time (i.e. collection->edit->change description) and finally written back to database.
With more users or admins using imeji simultaneously, this procedure can create situations where one user's/admin's changes override other user's/admin's changes.

Example 1:
User A and B are logged in at the same time.
User A shares collection C with User B and gives edit grants.
User A does: collection->edit->change description ("A's description") .
At the same time User B does: collection->edit->change description ("B's description") .
User A saves.
User B saves.

In database we have "B's description", which has overridden "A's description".

Similar cases with UserGroup, User (override access), Item can be produced.

Task: Implement synchronization mechanism for all shared resources.

@MPDLbrede MPDLbrede added the dev bug label Apr 1, 2019

@MPDLbrede

This comment has been minimized.

Copy link
Author

commented Apr 1, 2019

Also see #1117

@MPDLbrede MPDLbrede self-assigned this Apr 5, 2019

@MPDLbrede MPDLbrede modified the milestone: imeji 4.5 Apr 5, 2019

@MPDLbrede MPDLbrede added this to In progress in imeji 4.5 Apr 8, 2019

@MPDLbrede

This comment has been minimized.

Copy link
Author

commented Apr 18, 2019

Introduction of mutual exclusion into imeji can be done in different sub-tasks:
(1) Add a timestamp to shared objects, that saves when an object has last been modified. Use this as a means of data synchronization.
(2) Introduce an exception for the case that an object needs to be reloaded before it can be saved.
(3) Implement transactional (write) access to Jena that checks whether an object has been modified in the database since it was last read (and changed) before issuing a write action upon that object.
Throw a ReloadBeforeSaveException in case the object has been modified in database since it was last read.
(4) Re-write the mechanism of throwing and catching exceptions in Jena access package, such that a meaningful exception (see 2) can be passed from database access level to GUI to give feedback to users.
(5) Re-design the following mechanisms:
(5.1) User: Adding and deleting grants
(5.2) Usergroups: Adding and deleting grants and Users
Currently in imeji the full User and Usergroup object is read, edited and written back. Change this to adding and deleting single grants (5.1) and adding and deleting single grants and users (5.2) in database.

.. To be continued ..

MPDLbrede added a commit that referenced this issue Apr 18, 2019

#1122 Mutual exclusion
(1) data synchronization time stamp for Item and CollectionImeji
(2) new exception: ReloadBeforeSaveException
(3) transactional update access to Jena that checks timestamps
(4) re-design throwing and catching exception

MPDLbrede added a commit that referenced this issue Apr 23, 2019

#1122 Mutual exclusion (1)
Fix in legacy code. Old: Collection with new/changed logo was
saved twice to database. New: Save only one time.
@MPDLbrede

This comment has been minimized.

Copy link
Author

commented May 7, 2019

Description of changes and fixes:

Objective.docx

Test Cases:

TestCases.docx

@hofmannc

This comment has been minimized.

Copy link

commented May 29, 2019

Testserver: qa imeji
Browser: ff
Version: 4.5.3 - build date 2019-05-28 09:30:51
User: default user
Result: ok for
edit collections in parallel
edit items in parallel

MPDLbrede added a commit that referenced this issue Jun 5, 2019

MPDLbrede added a commit that referenced this issue Jun 5, 2019

MPDLbrede added a commit that referenced this issue Jun 6, 2019

#1122 fix
corrected status that is written during withdraw (WITHDRAWN)

MPDLbrede added a commit that referenced this issue Jun 7, 2019

#1122 fix
Changed action ADD (wrong) to action REMOVE in removeUserFromGroup

@haarli haarli removed this from In progress in imeji 4.5 Jun 7, 2019

@haarli haarli added this to In progress in imeji 4.6 Jun 7, 2019

@haarli haarli moved this from In progress to Done in imeji 4.6 Jun 7, 2019

MPDLbrede added a commit that referenced this issue Jul 11, 2019

#1122 Change the versioning scheme used with elastic search
There are two configuration options when using Elastic Search's external
Versioning system (see also
https://www.elastic.co/de/blog/elasticsearch-versioning-support )
- reject all index requests that have the same or a smaller version than
the current version of the document
- reject all index requests that have a smaller version than the current
version of the document.

Changed this to option 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.