-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syncing New Pages Can Error with "409 Conflict" #139
Comments
We added some retry logic to our CI, and as you can see in the logs, this might be related to page locking.
|
I'm seeing the same thing. I ran Request: 2022-04-11 13:38:08.589 TRACE rest: PUT /wiki/rest/api/content/3279323546 HTTP/1.1 {"ancestors":[{"id":"3279323269"}],"body":{"storage":{"representation":"storage","value":"Page Content Here"}},"id":"3279323546","metadata":{"labels":[]},"title":"My Page","type":"page","version":{"minorEdit":true,"number":2}} Response: 2022-04-11 13:38:08.997 FATAL Confluence API returned unexpected status: 409 Conflict, output: "{"statusCode":409,"data":{"authorized":false,"valid":true,"errors":[],"successful":false},"message":"com.atlassian.confluence.api.service.exceptions.ConflictException: javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [com.atlassian.confluence.pages.Page#3279323546]"}" Is there a reason why creating a new page requires a Create followed by an Update? I've never looked at the Confluence API. Can you not provide contents when creating a new page? Edit: I see why. The page needs to exist in order to handle processing the attachments and that logic happens in either a create or update scenario. |
So, adding a |
This helps mitigate a 409 conflict response from Confluence when creating a new page and then updating it right away. This may not be the cleanest solution, but it seems to do the trick. Resolves kovetskiy#139
I opened a PR for it either way. I'm happy to explore other options if this doesn't seem like the way to go. |
This helps mitigate a 409 conflict response from Confluence when creating a new page and then updating it right away. This may not be the cleanest solution, but it seems to do the trick. Resolves #139
Possibly a race condition when creating new pages. There seems to be two distinct operations, as indicated by the page's history:
We are seeing the following error when creating new pages:
It is believed the above two phases happening in quick succession might be the cause. A resync will allow the second operation to succeed.
The text was updated successfully, but these errors were encountered: