Skip to content

Replication of modify operations on same DN may be replayed out of order #139

Description

@jpn-e

Describe the bug
As part of replication OpenDJ will replay/apply changes in parallel if the changes are not considered to depend on each other.
This dependency check does not cover modify on the same DN, as a result the replica may end up with the wrong value.

For example, say we change an attribute value twice
1.

dn: uid=user,ou=People,dc=example,dc=com
changetype: modify
replace: mail
mail: userr@example.com
dn: uid=user,ou=People,dc=example,dc=com
changetype: modify
replace: mail
mail: user@example.com

The replica may end up replaying the changes in the order 2,1 instead of the expected 1,2 ending up with the wrong value for the mail attribute.

To Reproduce
Since the problem is caused by a race it can be hard to reproduce reliably.
The easiest way I have found to reproduce the problem is to stop the OpenDJ service on server 2, make repeated modifications on a DN on on server 1, then starting the service on server 2 again.

Expected behavior
Modifications on a DN should be replayed in order.

Activity

  1. vharseko commented on Sep 9, 2020

    @vharseko
    Member

    thanks for patch, please make pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions