Rally Software

Expand all | Collapse all

How to resolve ConcurrencyConflictException error

Jump to Best Answer
  • 1.  How to resolve ConcurrencyConflictException error

    Posted 09-26-2018 09:24 PM

    I am getting below error while trying to upload multiple values to a custom field dropdown value list. I have tried using lock, thread etc. and nothing is working. Any help is appreciated. Also, i would like to know what this object stands for - 14174856159. When i try looking for it, i get message that its deleted by another user. 

     

    What i am doing is fetching data from input array of string and uploading each string into the attribute value via for loop. Out of say 100 records, I get this message after every 2-3 records i.e. out of 100 strings, say 50-60 strings are getting uploaded. 

    {"CreateResult": {"_rallyAPIMajor": "2", "_rallyAPIMinor": "0", "Errors": ["Concurrency conflict: [Object has been modified since being read for update in this context] - ConcurrencyConflictException : Modified since read on update : Object Class : com.f4tech.slm.domain.WorkspaceConfiguration : ObjectID : 14174856159"], "Warnings": []}}



  • 2.  Re: How to resolve ConcurrencyConflictException error

    Posted 09-27-2018 07:22 AM

    morky01 or corkr03

     

    Any thoughts on this one?  The question is also on Stackoverflow...

     

    how to resolve concurrency conflict for bulk create in Rally using REST API using python - Stack Overflow 

     

    Michael



  • 3.  Re: How to resolve ConcurrencyConflictException error
    Best Answer

    Posted 09-27-2018 07:46 AM

    In case anyone else stumbles across this community post, I answered the stackoverflow question:

     

    "I'm not super familiar with the python toolkit, but in general this usually happens when you're bouncing around between app servers and you're firing off requests faster than the cache sync can occur. WSAPI writes are eventually consistent across the system, immediately consistent on the app server node that handled the request. Since all of your creates are modifying the same object (they all reference the same AttributeDefinition) you can get ConcurrencyConflictExceptions.

    Is there a way in the python toolkit to enable cookies? That usually works, since the load balancer should pin you to a specific node. It should also be faster, since it won't have to do the auth roundtrip on each request either."

     

    Hope that helps!



  • 4.  Re: How to resolve ConcurrencyConflictException error

    Posted 09-27-2018 02:31 PM

    Thanks @Michael for looking into it. Actually the stackoverflow question was also posted by me (was trying to get an answer from wherever I can )



  • 5.  Re: How to resolve ConcurrencyConflictException error

    Posted 09-27-2018 02:16 PM

    Thanks morky01 for the suggestion. I have not tried the cookies yet (its in my to do list), but a time delay along with a thread lock is a workaround as of now (I know thats not a good coding standard). It seems the WSAPI write time duration is more than 0.5 sec (i dont know the exact time) and python is trying to push faster than that. Thank you for the recommendation.