Expand my Community achievements bar.

Reverse replicate a delete operation

Avatar

Level 1

We have to do a massive migration of users. Our users are stored under a structure folder like this:

/home/users/company/<firstLetter>/<secondLetter>/<username>

e.g.: /home/users/company/t/e/test@mail.com

In our new approach we store users using a hash function and a five-level depth structure like this:

/home/users/company/ab/cd/ef/12/34/test@mail.com

So now we have to migrate all the users from the old structure to the new one. In order to do that we are moving the user nodes from path A to path B. So it is like oldUserNode is deleted and a newUserNode is being created.

So, we need to find a way to replicate that node's deletion. Obviously I can't set the cq:distribute property since the node is not there anymore, so I need to find a way to (reverse) replicate that action to the other instances.

Thanks in advance.

Cheers,

Clemente.

0 Replies