You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Cris Rockwell <cm...@umich.edu> on 2020/07/14 22:19:17 UTC

Can use of Deep Path in forward distribution replace content?

Question about forward distribution. In my scenario, the jcr:content has been changed since it was last distributed. 

My SimpleDistributionRequest looks like this
SimpleDistributionRequest simpleDistributionRequest = new SimpleDistributionRequest(DistributionRequestType.ADD, shallowPaths, deepPaths);

Where 
shallowPaths has paths related to a webpage "/content/website/page” "/content/website/page/jcr:content"
and 
deepPaths is a Set containing just "/content/website/page/jcr:content"

This fully distributes the webpage from source instance to the target Sling instance. After moving or deleting content under jcr:content on the source, and distribution with deepPaths is executed again, I expected all the content nodes should be replaced. Such that moved or deleted content would reflect on the target instance. What actually happens is that new content is merged with any content that was moved or deleted. 

Is there any way to avoid this behavior?  Or is it necessary in scenarios such as this to send requests with DistributionRequestType.DELETE before doing such deepPath forward distribution requests?

Cris