Skip to content

Harden atomic cache transaction recovery and backend failure semantics - #37

Merged
abmmhasan merged 17 commits into
mainfrom
patch/pdo-lock-capability
Nov 28, 2026
Merged

abmmhasan merged 17 commits into
mainfrom
patch/pdo-lock-capability

Conversation

@abmmhasan

@abmmhasan abmmhasan commented Nov 28, 2026 •

Copy link
Copy Markdown
Member

Addresses OTP PR #53 integration blockers and extends the atomic reliability audit across supported backends. No merge or release performed.

Implementation tracker

  • A: Source corrections for reported PHPStan, Psalm, Pint and Rector findings, including shared composite delegation, SQLite initialization contention, unreachable Tiered tag-generation branch, MongoDB atomic direct insert (removed redundant callable guard) and composite method spacing; final hosted PHPStan, Psalm, Pint and Rector verification passed.
  • B: Shared bounded PDO atomic transaction retry for setIfAbsent, compareAndSet and getAndDelete: PostgreSQL 40001/40P01, MySQL/MariaDB 40001/1213 and HY000/1205, SQLite BUSY and recognized extended BUSY codes. Preserve original errors, avoid unknown-outcome replay, reject caller-owned transactions and avoid replay with object/closure options.
  • C: Replace INSERT IGNORE, require InnoDB when installing MySQL schema, preserve rollback failures, reject same-session advisory reentry and verify server-side ownership.
  • D: Distinguish invalid native atomic responses from contention/misses for Redis/Valkey, Redis Cluster and Memcached; require confirmed MongoDB atomic write results.
  • Add PostgreSQL injected SQLSTATE tests for all three atomic operations, existing/expired-key races under default and SERIALIZABLE isolation, lock session-loss/reentry/external-unlock tests, MySQL same-session regression, SQLite busy exhaustion and backend failure classification tests.
  • Update PDO and MongoDB docs, including retry scheduling vs database timeout, partial bulk commits, caller-owned transaction constraints and write acknowledgement.
  • E: Opt-in APCu arbitrary-value coordination and ScyllaDB/Cassandra native LWT; unit tests and real CQL smoke added. Native CQL release worker passed on the final head for PHP 8.4/8.5.
  • F: Authoritative-only Tiered and SQLite-only Node atomic delegation, with regression tests; fixed the Node fixture to use the existing private directory.
  • G: Hosted QA, analysis, benchmarks and Release Verification passed on 0666b18 (38 successful jobs, 2 intentional workflow skips).
  • PostgreSQL advisory-lock regression coverage passed (same-session exclusion, external unlock, session loss and reacquisition). The original historical failure was not independently reproduced; retain this as an investigation limitation, not a failing current check.
  • Review both outdated MongoDB Psalm threads (MixedAssignment / MixedMethodCall); PHPStan and Psalm explicitly passed on PHP 8.4, 8.5 and 8.6 at 0666b18; both threads resolved.

Explicitly not certified or deferred

Ordinary writes, bulk chunks, tag operations, schema installation and cluster publishing are not automatically replayed; independent proof of retry safety is needed. Existing bulk operations can partially commit and this is documented. Native Scylla CQL PHP 8.6 driver certification, active-upper-tier atomic reads, extra SQL driver certification, retry metrics, and full authentication-state capability review remain separate follow-up work. Do not publish until hosted checks and relevant review findings are resolved.

@abmmhasan abmmhasan changed the title Fix PDO authentication-state capability and conditional insert contention Harden atomic cache transaction recovery and backend failure semantics Nov 28, 2026

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Psalm found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@abmmhasan
abmmhasan merged commit 25d86fa into main Nov 28, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants