multiple Ritm request at a time through a azure portal and payload get mismatched to creat ritm .

Rahul77
Tera Contributor

Hey everyone ,

 

i have mapped a payload through azure portal what we get from that portal it work as expected when a single request is raised at certain interval of time but when multiple request raise at a time then payload get mismatched and their requester information also get mis matched.

 

 

Thanks & regards

Rahul

3 REPLIES 3

The Machine
Kilo Sage

Sounds like a race condition issue with the cart.  I think I got around this by creating separate carts for each request so if there were multiple requests, it would be tied to the cart_id that I set to the sys_id of the request through a custom scripted rest api.  It was a very complex solution that required. 

The other option which wasn't one for me.  Is if its tied to that user who initiated it.  That might help break that race condition.  My main barrier is I had to initiate requests as the user through a single web service account.  Not easy.

Good luck 🙂 

mipalm
Tera Guru

Hi Rahul, 

I have faced similar issues with mismatched info.

Have you tried adding a small delay in the beginning of the function? It seemed to help me with my issue which was overload.

The best way to do it would be a whats known as a mutex lock which can lock the transactions until its released.  Its the same mechanism thats used when update sets or a plugin is installing and you can't commit an update set.

Thats why for my solution, I made each request a separate cart ID, that solved the mismatched information because each cart was unique to the requestor.  

Delays from what I've seen just pause the inevitable.  After the delay the process continues and you have mismatched information again.  

Its not an easy issue to do, unless you can separate each request cart by the user or some other unique identifier.  The requestor worked best for me.