[ 
https://issues.apache.org/jira/browse/SLING-4711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14543548#comment-14543548
 ] 

Marius Petria commented on SLING-4711:
--------------------------------------

[~maciusio] SDC in the context of community users does not have the requirement 
of concurrent writes on different instances. The setup is assumed to be based 
on sticky sessions and one user can edit its profile only on one instance.

In fact in this context it is required *not* to distribute back to the 
originating instance, as that would make the experience rather annoying for an 
user that is in the process of editing its profile (any temporary changes on 
that instance will be temporarily overwritten by older content).

I am not sure how we can keep this requirement in place (do not distribute 
back) and also fix the current issue of concurrent writes that switch content. 

> Syncing via a coordinate agent - conflicts resolution
> -----------------------------------------------------
>
>                 Key: SLING-4711
>                 URL: https://issues.apache.org/jira/browse/SLING-4711
>             Project: Sling
>          Issue Type: Bug
>          Components: Distribution
>    Affects Versions: Content Distribution Core 0.1.1
>            Reporter: Maciej Dybek
>         Attachments: screenshot-1.png
>
>
> Basically this issue should be treated as a question/bug.
> I'm trying to synchronize two Sling instances A and B via a (third) 
> coordinating instance C. This scenario is described 
> [here|https://github.com/apache/sling/tree/trunk/contrib/extensions/distribution#sync-distribution].
> I am using SyncDistributionAgentFactory on the syncing instance and 
> QueueDistributionAgentFactory on synced instances.
> On the syncing instance I'm using ScheduledDistributionTrigger which runs 
> every 60 seconds.
> The scenario I wanted to test is conflict resolution. I made changes to the 
> same resource on both "publish" instances A and B. On A instance I changed 
> property X to value "A" and on B instance I changed the same property  to 
> value "B" 
> Currently the algorithm is as follows:
> 1. The syncing agent retrieves distribution packagages from both synced 
> instances A and B.
> 2. The syncing agent have now two packagages which should be send to 
> importers on synced instances.
> 3. The agent checks the first package and it sees that the package is from 
> instance A thus it is not going to send the package to A instance. The agent 
> sends the package to B instance. On B instance property X is of value "A".
> 4. The agent checks the second package and it sees that the package is from 
> instance B thus it sends the package only to A instance. On A instance 
> property X is of value B.
> *Actual results:*
> Instances A and B are unsynchronized because the same property is of 
> different values on both of them.
> *Expected results:*
> Instances A and B should have the same content.
> The question is if this is expected behaviour? Should I use some other 
> implementations to sync my Sling instances?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to