Reverse replication for delete event | Community
Skip to main content
Level 3
Jul 14, 2022 10:55 PM UTC
Solved

Reverse replication for delete event

Hi,

 

I am currently using reverse replication for add and modifying a node.

 

But I am not able to reverse replicate for delete node. Right now it only deletes on one publisher from where the delete request is submitted.

 

replicator.replicate(session, ReplicationActionType.DELETE, path)

 

I have couple of questions here

 

Should it be ReplicationActionType.DELETE or ReplicationActionType.DEACTIVATE ?

Secondly, what should be the path? should it be path of node to be deleted ?

 

Right now there are two launchers for create and modify events.

Do I need launcher for Delete event ?

 

Any help on this would be much appreciated.

 

Thanks

Harpreet

 

 

SantoshSai
SantoshSaiAccepted solution
New Participant
Jul 15, 2022 3:13 AM UTC

Hi @hptarora ,

There will be 2 aspects here: 

  1. Author Instance
    In ReplicationActionType.DELETE, it deletes  the node from repo and push/replicate the same to publisher as well while in ReplicationActionType.DEACTIVATE, the content or the node will still be available in author but it gets out of publisher. so in future when needed that content can be published again.
  2. Publisher Instance
    ReplicationActionType.DELETE & ReplicationActionType.DEACTIVATE are same.

Kindly, have a look at your replication queues and make sure they are not stuck in queue. and Yes, pathToDeactivate the node.

Additionally, worth checking about Content Distribution: https://sling.apache.org/documentation/bundles/content-distribution.html

Regards,

Santosh

Santosh Sai

3 replies

Aditya_Chabuku
New Participant
Jul 15, 2022 3:18 PM UTC

Hi @hptarora You dont need a third Launcher to Delete, just use the modify one itself.

Translate
Thanks,Aditya Chabuku
SantoshSai
SantoshSaiAccepted solution
New Participant
Jul 15, 2022 3:13 AM UTC

Hi @hptarora ,

There will be 2 aspects here: 

  1. Author Instance
    In ReplicationActionType.DELETE, it deletes  the node from repo and push/replicate the same to publisher as well while in ReplicationActionType.DEACTIVATE, the content or the node will still be available in author but it gets out of publisher. so in future when needed that content can be published again.
  2. Publisher Instance
    ReplicationActionType.DELETE & ReplicationActionType.DEACTIVATE are same.

Kindly, have a look at your replication queues and make sure they are not stuck in queue. and Yes, pathToDeactivate the node.

Additionally, worth checking about Content Distribution: https://sling.apache.org/documentation/bundles/content-distribution.html

Regards,

Santosh

Translate
Santosh Sai
hptaroraAuthor
Level 3
Jul 17, 2022 9:23 AM UTC

Hi @santoshsai , @aditya_chabuku 

Thank you for your reply. I tried using both ReplicationActionType.DELETE  and ReplicationActionType.DEACTIVATE but nothing works.

 

It doesn't show up in replication queues at all. It looks like doesn't trigger the replication.

 

It tried using Launcher for Delete but no luck.

 

Replication is working fine for create and modify but not working for delete.

Any idea why it isn't triggering the replication.

 

Thanks

Translate