You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/08/09 18:18:04 UTC

[GitHub] [couchdb] thigg edited a comment on issue #1506: Support server side / auto conflict resolution

thigg edited a comment on issue #1506: Support server side / auto conflict resolution
URL: https://github.com/apache/couchdb/issues/1506#issuecomment-520015905
 
 
   As far as I understand you, you pointed 2 problems out:
   
   1. If conflict resolution is not strictly deterministic we might get feedback loops.
        It would be better to prohibit them by design and not encourage users to break stuff.
    2. Conflict resolution is almost always business logic and therefore general solutions are of very limited use/impossible.
   
   A solution that comes to my mind is to provide functions which are safe to use together with a fieldmatcher. So something like that:
   
   ```
   a.b -> min
   c.d -> ListMerge
   a..[aa*b] -> max
   ```
   That would mean:
    -  for conflicts in the path a.b chose the minimum, if it is a number
    - for conflicts in the path c.d merge the lists deterministically, if the field is an array
    - for conflicts in a path below a where a field matches the pattern aa*b use the max value if it is a number
    - If the conflict can not be fully resolved by that: skip
   
   that would provide a safe deterministic way to resolve conflicts which would allow to solve at least a couple of conflicts. The main question with that would be, if it is actually of so much use, that it is worth the effort.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services