Repository navigation
Never report a publish the database did not keep - #26
Merged
Merged
Conversation
When the database connection drops, wpdb reconnects and sends the statement again. A COMMIT sent again succeeds on a session that never began the transaction, so a page the server had rolled back was answered with 201, and a receipt written on the new session replayed that answer forever. A command now checks that it is still on the session it began on, and that its receipt is stored after COMMIT. Otherwise it answers 503 citecue_transaction_failed, which is safe to retry. A save hook that saves another CiteCue page during a command now revokes that page's ownership, as any other save of it does. It takes no second lock, so two commands cannot deadlock. The protocol doc no longer says an observation never delays an editor's save: it holds the page's lock for its few reads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Version strings, changelog and upgrade notice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three follow-ups to #25 for Autopilot's conditional publishing. 1.6.0 shipped without them. CiteCue does not use conditional publishing yet, so no site is affected today. Ships as 1.6.1.
COMMITsucceeds even though the server already rolled the page back, so the plugin answered 201 for a page that does not exist. It now checks that it is still on the same database session and that the command's receipt was stored. Otherwise it answers 503citecue_transaction_failed, and the command can be retried.Checks
composer lint,phpcs,test:core,test:woocommerceandtest:multisitepass on MariaDB 10.11.COMMITand at the page insert. Both first answers were 503. After theCOMMITcase the retry published the page. After the insert case the retry answered a revision conflict, and an observation returned the page.🤖 Generated with Claude Code