My system integrates Jira. When the user calls my API, because the response of create jira is too slow, I set a timeout period. If this time is exceeded, I will return an error, but the Jira ticket will be created successfully, and the user will be sent again Calling my API will create multiple Jira tickets. I am thinking, does Jira have an idempotent creation API? I call it many times and still only create one. I need this function.
The first question I have is why do you implement a custom/different timeout than the endpoint? What is the logical reason to do that?
Second, why would the issue creation need a custom timeout to begin with, isn't it more suspicious for it to take "that" long (no idea how long)?
Third, no, you're not creating an issue by issue key, you're creating an issue with issue details. To prevent creating a duplicate, you would need to perform a lookup for the issue (e.g. JQL search, but this is risky and prone to fail in case of multiple nodes, if your indexes are lagging behind), alternative could be w/ java API if you had created a custom endpoint. Then, you could potentially do a fully cluster-safe implementation, but that would be one hell of a ride if we are talking about a full "idempotence" - multiple clients/requests trying to create an issue simultaneously since you only would want a single one of those requests to go through, while the others are waiting for the first one's result. I mean, that sounds like such a whiff for something which should not be needed in the first place.
I don't have an idea why you would decide to implement a lower/custom timeout from the original endpoint, when you are just forwarding the request to it, but that sounds like the cause to me here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.