Deferred Operation Failed with Multi-Threaded Client Application
Context: I'm developing an app that creates test cases using the REST API. It POSTs the test cases using the REST client that is part of the RQM Copy Utility. It is also multi-threaded -- there's a separate thread for each test case that is created. Each thread has its own instance of the REST client. The app creates and runs 10 threads at a time.
The Symptom: What I'm seeing is that, consistently, the QM server returns an http code of 412, an exception is thrown by the REST client (the exception message is State identifier null is stale) and in the QM server log I see a "deferred operation failed" message. With a set of 160 test cases, around 3 threads run into this. I've worked around the symptom by POSTing with retries. This has so far worked. I've haven't yet even seen any thread need to retry more than 1 once.
|
One answer
David Honey (1.8k●1●7)
| answered Mar 21 '22, 12:54 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
A 412 reponse is often use to indicate that a pre-condition fails. For example, when updating a resource, a client might:
However, in your usage, you're not doing that directly - you're using the RQM Copy Utility. I don't know that utility. Perhaps someone else on this forum can advise. Perhaps you can enable HTTP wire logging to see the exact HTTP requests and responses.
Comments
Daniel Chirillo
commented Mar 21 '22, 1:02 p.m.
Thanks for the response. I updated my description to include the exception message: State identifier null is stale.
In my case, nothing is being updated. It's just creation, so .... there is no risk of some artifact being out of sync with the server. The exception message, though, is a bit... well...not clear ;) [thus the post to the forum]
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.