Timing problem with RelinkDocumentOperation

Hello,

we use the RelinkDocumentOperation rpc function to change the links in our tree to account for new predecessorLinkRef changes.

The rpc operation first creates a new link then deletes the old one hence creating new link refs. To keep the predecessorLinkRefs up to date with the newly created links we have a map that maps the old link refs to the new link refs. We use a forEach loop to call the rpc function on every link that has to be modified. The predecessorLinkRefs of the links are changed to the link ids of the result of the RelinkDocumentOperation.

We get the error “Missing predecessor Link” when doing this. Why could that be the case? To my understanding the new link should exist when referencing it later. Is this a timing problem? Could this be caused by a racing condition? What could i do to prevent this error or how would i implement it in a way that takes the newly created links into consideration?

Hi @nbirkner ,
I see from your post that you are still using Data Services v35.x, (2023.02 release), right?
There is a known bug in this version, see Jira ticket A12S-3708.

The problem occurred if there were more than 10 links and you tried to relink a link beyond the 10th link.

Could it by that your problem has the same cause?

If so, I would recommend to upgrade to version 36.x (Support for 2023.02 expires at the end of 2023 anyway, as far as I know)

In the end, the issue has been identified elsewhere than in A12 Data Services and the thread is no longer relevant. After discussing with nbirkner the Discourse team is closing the thread. In case of re-occurrence, a new thread needs to be created.
Discourse moderation team