Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Leorank Racecondition

Philipp Kriegel
Contributor
March 21, 2022

Hi there,

 

currently i'm maintaining a Script on a Data Center System that creates subtasks for an issue.

Our problem is that when on both nodes the creation is running at the same time one of the two instances breaks down with the following error message:

while updating tuple (x,y) in relation "AO_60DB71_LEXORANK"

Does someone has an idea whats the best approach to create multiple issues from different Data Center nodes at the same time

1 answer

1 accepted

0 votes
Answer accepted
Derek Fields _RightStar_
Community Champion
March 21, 2022

I'm not sure that this is the best method. I would create a table with one column called "LOCK" as a primary (unique) key. Before I start to create the sub-task, I would try to insert a record into the table with a constant (e.g. "locked") so that if there is already a record, it would fail. If it succeeds, then create the sub-task and delete the record. If it fails, loop until it succeeds. Since the process of creating the sub-task is relatively quick, this would be a short blocking routine.

Let me know if that helps.

Philipp Kriegel
Contributor
March 30, 2022

Hi there,

sorry for the late reply.

 

Thats what we endet with, a mix between a custom Database Lock and the usage of the Rest API instead pure issueManager/Service

Suggest an answer

Log in or Sign up to answer