fix: preserve native transaction and lock semantics - #391
Merged
Conversation
chubes4
marked this pull request as ready for review
September 9, 2026 12:23
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.
Summary
Repair native savepoint semantics outside transactions, add root-scoped advisory locks with logical connection ownership, and support conditional option-value updates under the existing mutation lock.
Lock files remain stable across ownership transfer to avoid split-inode races. Reentrant acquisition, release/close, stale-file handling and multisite ownership have independent-process coverage. Supported waits are explicitly bounded to10 seconds. Conditional option updates use supported ASCII nonbinary collation semantics; explicit BINARY comparison remains byte-exact. Unsupported Unicode collation remains an explicit limitation.
Verification
Exact candidate:
3fb04a00c169895f861c0f4dde9ea531cdb237b7, based on main91ef5e7.Remaining venue differences are explicit: native accepts a foreign-site attachment that MySQL rejects; three tests require physical mysqli access. Event-upsert unit tests rewrite lock queries to SELECT1, whose support is separate work in #393. No full consumer-parity claim is made.
Reproduction
For the paired consumer run, use wp-codebox's managed multisite wordpress.phpunit command with plugin-slug=data-machine-events, test-file=tests/Integration/VenueProfileMutationsTest.php, database-type=mdi-native versus mysql, the pinned DME source
88d55a907b12638e88baee5b492501dbed5c2665, Data Machine dependency31befb659aaa5268e79a0c28a16321c3ee5e1108, and managed wp-phpunit harness. Override the MDI extra-plugin source with this candidate without retaining the bundled archive digest, and verify loaded PHP file hashes.Supports #377, which remains open. No release or deployment is included.
AI Assistance
OpenAI GPT-5.6 Terra (
openai/gpt-5.6-terra) via OpenCode implemented repairs and ran paired consumer verification. GPT-6 Astra (openai/gpt-6-astra) via OpenCode reviewed lock races, result semantics, source provenance and collation, independently reran the exact candidate's Linux gates, and finalized this scoped improvement under Chris Huber's direction.