Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Implement replication conflict solving #75

Open
satabin opened this issue Nov 3, 2016 · 0 comments
Open

Implement replication conflict solving #75

satabin opened this issue Nov 3, 2016 · 0 comments

Comments

@satabin
Copy link
Member

satabin commented Nov 3, 2016

When replication process has been run, the conflicting revisions are present on all nodes, however even though the same winning revision is chosen, it is up to the clients to resolve the conflicts and delete the conflicting revisions once merged.

This can be done in several ways, among which:

  • periodic cleaning task
  • on first document retrieval
  • ...

Similarly to the automatic conflict resolution mechanism, it should be possible to get a Database instance which implements the conflict resolution on first retrieval. Moreover, giving access to a resolveConflicts method in Database can make it possible to implement any other cleaning strategy such as the periodic task.

Resolve on fetch

Add an argument to method CouchDB.database so that signature becomes

def database(name: String, credit: Int = 0, strategy: Strategy = BarneyStinsonStrategy, resolveOnFetch: Boolean = false): Database

The resolution strategy used is the same as for local conflict resolution.

Question: is the order of conflicting revision deterministic?

Explicit resolution

Add a method to Database

def resolveConflicts(strategy: Strategy): Future[List[DbResult]]

Returning for each conflicting document, the resolution status.

@satabin satabin added this to the 2.1.0 milestone Nov 3, 2016
@satabin satabin self-assigned this Nov 3, 2016
@satabin satabin changed the title Implement repolication conflict solving Implement replication conflict solving Nov 14, 2016
@satabin satabin modified the milestones: 2.2.0, 2.1.0 Jan 26, 2017
@satabin satabin modified the milestones: 2.2.0, 3.0.0 May 15, 2017
@satabin satabin modified the milestones: 3.0.0, 4.0.0 Dec 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant