[
https://issues.apache.org/jira/browse/SLING-4711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14539436#comment-14539436
]
Marius Petria commented on SLING-4711:
--------------------------------------
I think you are right, the property is actually switched between instances.
We can probably solve this in two ways:
1. Drop the optimization that makes a package not to be sent back to the
originating instance. This way the packages are always sent to all instances
and because they are added in the the order of receiving to the import queues
then the "sameness" is preserved (last one wins)
2. Improve the optimization such that a package that modifies the same path
erases all the other packages that are already in import queues and modify the
same paths. This seems harder to implement.
> 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
>
> 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)