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

VersioningTrigger doesn't avoid write conflicts #8

Open
dovikos opened this issue Apr 26, 2017 · 3 comments
Open

VersioningTrigger doesn't avoid write conflicts #8

dovikos opened this issue Apr 26, 2017 · 3 comments

Comments

@dovikos
Copy link

dovikos commented Apr 26, 2017

What is the problem

The VersioningTrigger doesn't avoir conflicts.

What did you expect

Following document about parameter overwrite as described here, I expect that a user can't overwrite modifications already committed by another one, when they're editing the same document at the same time.

Describe how to reproduce or add a test

  • Add xquery-versioning-module in your eXist-db instance.

  • In $EXIST_HOME/conf.xml, add the following line in the <builtin-modules> element as explained here (paragraph Direct Installation into eXist-db (.jar)):
    <module uri="http://exist-db.org/xquery/versioning" class="org.exist.versioning.xquery.VersioningModule"/>.

  • In $EXIST_HOME/conf.xml, enable the VersioningFilter by adding the following line in the <serializer> element as explained here:
    <custom-filter class="org.exist.versioning.VersioningFilter"/>.

  • Restart eXist-db.

  • Configure a collection with the versioning trigger registered (see here) with parameter overwrite="no".

  • With different accounts, try to overwrite changes of a user and see that one may overwrite the other's changes.

Context information

  • eXist-db version + Git Revision hash: eXist-db 3.2.0-SNAPSHOT / c7f6e81
  • xquery-versioning-module version + Git Revision hash: 1.1.4 / fbdecdb
  • Java version: Java8u121
  • Operating system: Windows 7
  • 64 bit
  • Custom changes: in conf.xml, I added the following line in the <builtin-modules> element as explained here:
    <module uri="http://exist-db.org/xquery/versioning" class="org.exist.versioning.xquery.VersioningModule"/>
    I also enabled the serialized filter VersioningFilter as explained here.
    I configured versioning trigger with parameter <parameter name="overwrite" value="no"/> on my collection, as explained here.
@dizzzz
Copy link
Member

dizzzz commented Apr 26, 2017

"user can't overwrite a file modified by another one." ... maybe we should read this as "user can't overwrite a file when it is being modified by another one." ?

@dovikos
Copy link
Author

dovikos commented Apr 26, 2017

I clarified : "a user can't overwrite modifications already committed by another one, when they're editing the same document at the same time."

@dovikos
Copy link
Author

dovikos commented Apr 26, 2017

Example: John and Bob are editing the same document at revision n.
John commits first. The document is now at revision n+1.
When Bob commits, I understand from the documentation that he should get an error. Because setting parameter overwrite to no (in collection config) should cause VersioningTrigger to check if revision dit not change (n+1 ≠ n).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants