Skip to content

chore: bump utopia database to 7.3.5 - #13540

Merged
loks0n merged 5 commits into
mainfrom
codex/bump-database-7.3.5
Sep 8, 2026
Merged

loks0n merged 5 commits into
mainfrom
codex/bump-database-7.3.5

Conversation

@loks0n

@loks0n loks0n commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Bumps the locked utopia-php/database dependency from 7.3.4 to 7.3.5, which reduces document copying and allocations during database validation and conversion. The existing ^7.0.0 constraint already permits this patch.

Also fixes failures exposed by the full CI matrix:

  • Scope staged transaction collections by database as well as collection ID. A transaction spanning two databases with the same public collection ID previously reused the first database's collection metadata and failed on MongoDB.
  • Keep function and site deployment chunk writes and assembly under the same upload lock. Previously a concurrent request could count or assemble partially written chunks, corrupting the archive, or count zero parts after another request finalized the upload.
  • Invalidate the project cache after committing template updates, so a concurrent reader cannot leave a pre-commit value cached. Keep the template tests' immediate read-after-write assertions.
  • Wait for the SSR route to become available before checking its execution logs, and for the delete worker to invalidate an old preview before comparing replacement file content.

Test Plan

  • Full CI passed on 88fe31fb3a: build, unit tests, lint, Rector, PHPStan, E2E matrix, and benchmark.

  • All six Project adapter suites pass with immediate template read-after-write assertions. Both MongoDB Usage suites and all Functions/Sites adapter suites pass.

  • Existing E2E tests cover cross-database collection IDs, parallel chunk uploads, template overwrites, and replacement file previews.

  • Targeted Pint, PHPStan, Composer validation, and git diff --check pass. Composer reports existing version-constraint warnings; lockfile generation used --ignore-platform-reqs on the host, with runtime compatibility validated by CI.

  • CI required retries for an antivirus stream failure, an unhealthy MongoDB startup, account setup and realtime event failures, and a transient site-route 404. Two stalled jobs were cancelled and restarted on fresh runners; all final results are green.

  • Latest benchmark, 20 virtual users for one minute per version:

    Metric Before After Change
    Requests/sec 170.15 172.11 +1.2%
    Latency P50 100.29 ms 99.21 ms -1.1%
    Latency P95 244.72 ms 240.41 ms -1.8%

    These modest changes fall within the benchmark's ±5% neutral band; one run does not establish a statistically significant improvement.

Related PRs and Issues

Checklist

@github-actions

github-actions Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

✨ Benchmark results

Comparing main (before) → codex/bump-database-7.3.5 (after).

Metric Before After Change
🚀 Requests/sec 170.15 172.11 ⚪ +1.2%
⏱️ Latency P50 100.29 ms 99.21 ms ⚪ -1.1%
⏱️ Latency P95 244.72 ms 240.41 ms ⚪ -1.8%
Per-scenario breakdown & investigation details

Metrics below reflect the current branch (after). Δ P95 compares against the base.

Scenario P50 (ms) P95 (ms) Requests RPS Δ P95 (ms)
API total 99.21 240.41 10,944 172.11 -4.31
Account 200.97 370.65 576 9.53 -18.43
TablesDB 93.97 179.36 5,952 96.65 -0.74
Storage 95.07 205.34 2,880 48.14 -2.5
Functions 148.83 297.1 1,536 26.44 +2.43

Top API waits (after)

API request Max wait (ms)
account.name.update 517.54
tablesdb.rows.create 510.18
account.prefs.update 478.45
functions.variables.update 459.31
functions.delete 437.81

@greptile-apps

greptile-apps Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates utopia-php/database from 7.3.4 to 7.3.5 and includes concurrency and cache-consistency fixes exposed by CI.

  • Scopes transaction collection metadata by database and collection ID.
  • Serializes function and site deployment chunk writes with archive assembly.
  • Purges project template cache after transaction commit.
  • Makes asynchronous SSR-route and preview-cache tests wait for eventual consistency.

Confidence Score: 5/5

The PR appears safe to merge, with no outstanding correctness, security, or repository-rule issues identified.

The dependency update and accompanying fixes preserve request and resource scoping, serialize chunk completion correctly, and account for asynchronous cache propagation in tests; no blocking failure remains.

Important Files Changed

Filename Overview
composer.lock Locks utopia-php/database to version 7.3.5 with its corresponding source reference.
src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Operations/Create.php Keys cached collection metadata by both database and collection identity to prevent cross-database reuse.
src/Appwrite/Platform/Modules/Functions/Http/Deployments/Create.php Moves function deployment chunk writes under the same lock used for completion and assembly.
src/Appwrite/Platform/Modules/Sites/Http/Deployments/Create.php Serializes site deployment chunk writes and archive assembly under one deployment lock.
src/Appwrite/Platform/Modules/Project/Http/Project/Templates/Email/Update.php Invalidates cached project templates after the transaction commits.
tests/e2e/Services/Sites/SitesCustomServerTest.php Waits for the SSR route to become available before inspecting its execution log.
tests/e2e/Services/Storage/StorageBase.php Retries preview verification while asynchronous cache invalidation completes.

Reviews (4): Last reviewed commit: "fix: synchronize function uploads and aw..." | Re-trigger Greptile

@loks0n
loks0n merged commit dff5936 into main Sep 8, 2026
569 of 576 checks passed
@ChiragAgg5k ChiragAgg5k mentioned this pull request Sep 10, 2026
2 of 4 tasks
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.

1 participant