serverpod-offline-sync/test/serverpod_offline_sync_test_server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 9495f616c4
perf: Skip the projection passes for merged inserts that cannot change them
A merge that touched any foreign key ran the planning pass for its new
rows and then the full projection pass, whose closure follows foreign
keys both ways and so loads every row connected to the merged ones. In a
library whose tags join its parts, one merged rating, edit, tag or new
card loaded all of it: about 9.5 s on a device receiving it and 12 s on
the server merging a push, for 8,000 cards.

A batch that only inserts new rows (each once) and updates columns no
projection reads now leaves both passes out when its inserts are proven,
as local inserts are (canLeaveProjectionUnchangedByMergedInserts, on
localProjectionDependenciesAreStable): each row references its parents by
id, each parent visible or inserted earlier in the same batch, nothing
refers to the row yet (no row, no attempted value), and no unique claim
is contested. A parent inserted after its child in the batch would find
the child's reference held back, which only the pass restores, so it
counts only when earlier. Deletes, inserts onto rows there already and
anything unproven take the passes as before. The batch's parents are
still resolved together for the writes.

The new tests cover a child of a visible parent, a parent and child in
one batch (both through the shortcut), and a child of a merged delete
and a parent arriving after its held-back child (both through the
passes); dropping the parent or the reference check fails the matching
test. The core, server, integration and simulation suites pass, but for
two PostgreSQL tests that cannot start their database while another
embedded PostgreSQL runs, with or without this change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 19:11:58 +02:00
..
.test_databases test: Add a DST and tests reproducing found failures (#110) 2026-09-04 13:09:20 -03:00
bin refactor: Replace drift by serverpod as core engine (#33) 2026-05-03 09:09:23 -03:00
config fix: Preserve shared model and SQLite value types during sync (#118) 2026-09-16 00:07:51 -03:00
lib fix: Author the column default an upsert writes for a null foreign key (#164) 2026-10-08 22:48:47 -03:00
migrations fix: Author the column default an upsert writes for a null foreign key (#164) 2026-10-08 22:48:47 -03:00
test perf: Skip the projection passes for merged inserts that cannot change them 2026-10-17 19:11:58 +02:00
.gitignore refactor: Move the core implementation to the shared package with no manual queries (#107) 2026-08-04 11:04:04 -03:00
analysis_options.yaml feat: Implement the sync protocol (#54) 2026-05-29 01:54:23 -03:00
CHANGELOG.md refactor: Replace drift by serverpod as core engine (#33) 2026-05-03 09:09:23 -03:00
dart_test.yaml test: Harden DST authored-state checks and workloads (#123) 2026-09-17 10:39:07 -03:00
pubspec.yaml fix: Prevent web deadlocks in transactional membership reads (#161) 2026-10-08 19:00:44 -03:00
README.md refactor: Replace drift by serverpod as core engine (#33) 2026-05-03 09:09:23 -03:00

serverpod_offline_sync_test_server

This is the starting point for your Serverpod server.

To run your server, you first need to start Postgres and Redis. It's easiest to do with Docker.

docker compose up --build --detach

Then you can start the Serverpod server.

dart bin/main.dart

When you are finished, you can shut down Serverpod with Ctrl-C, then stop Postgres and Redis.

docker compose stop