perf(nodes): integrate batched reconciliation with main

Preserve node-scoped outbox cancellation and the staged traffic transaction while collecting successful detached IDs. Cover comment races, savepoint rollback, and PostgreSQL row-lock contention in CI.
This commit is contained in:
Hamed Sanaei
2026-12-02 17:10:30 +03:30
92 changed files with 6197 additions and 882 deletions
+29 -3
View File
@@ -144,6 +144,16 @@ jobs:
exit 1
fi
- name: PostgreSQL node client push ordering
run: |
set -o pipefail
go test ./internal/web/service -run '^Test(NodeClientMutationsCommitWhileAnEarlierPushIsBlocked|NodeClientQueueTimeoutDefersCommittedDelta|NodeClientCapacityPreservesPermanentDelete|NodeWideDeleteSkipsReattachmentSentByQueuedReconcile|NodeWideDeleteRetriesAfterQueueExpiry|BulkDeleteStopsPushingToAHungNode|ReconcileDoesNotOvertakeCommittedClientState|TrafficDepletionWaitsForEarlierNodeClientPush)$' -count=1 -v | tee /tmp/postgres-node-client-order.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-client-order.log || true)
if [ "$passed" -ne 8 ]; then
echo "expected 8 passing PostgreSQL node client ordering tests, got $passed" >&2
exit 1
fi
- name: PostgreSQL global-traffic heartbeat regressions
run: |
set -o pipefail
@@ -207,12 +217,18 @@ jobs:
- name: PostgreSQL node client reconciliation
run: |
set -o pipefail
go test ./internal/web/service -run '^TestNodeFullReconciliation' -count=1 -v | tee /tmp/postgres-node-client-reconciliation.log
go test ./internal/web/service -run '^Test(NodeFullReconciliation|NodeMerge(BatchesBaselinesForActiveClients|LetsSubscriptionTouchDuringClientReconciliationPostgres)$)' -count=1 -v | tee /tmp/postgres-node-client-reconciliation.log
passed=$(grep -c -- '^--- PASS: TestNodeFullReconciliation' /tmp/postgres-node-client-reconciliation.log || true)
if [ "$passed" -ne 2 ]; then
echo "expected 2 passing node client reconciliation tests, got $passed" >&2
if [ "$passed" -ne 4 ]; then
echo "expected 4 passing node client reconciliation tests, got $passed" >&2
exit 1
fi
for test in TestNodeMergeBatchesBaselinesForActiveClients TestNodeMergeLetsSubscriptionTouchDuringClientReconciliationPostgres; do
if ! grep -q -- "^--- PASS: $test " /tmp/postgres-node-client-reconciliation.log; then
echo "expected PostgreSQL regression to pass: $test" >&2
exit 1
fi
done
- name: PostgreSQL node counter reset regressions
run: |
@@ -224,6 +240,16 @@ jobs:
exit 1
fi
- name: PostgreSQL node merge contention
run: |
set -o pipefail
go test ./internal/web/service -run '^TestNodeMerge(LetsSubscriptionTouchDuringClientReconciliationPostgres|BatchesBaselinesForActiveClients)$' -count=1 -v | tee /tmp/postgres-node-merge-contention.log
passed=$(grep -c -- '^--- PASS' /tmp/postgres-node-merge-contention.log || true)
if [ "$passed" -ne 2 ]; then
echo "expected both PostgreSQL node merge contention tests to pass, got $passed" >&2
exit 1
fi
- name: PostgreSQL schema and migration tests
run: |
set -o pipefail