M12.7: bind census evidence to database history domains
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m10s
Foundation / checks (network) (push) Successful in 21m32s
Foundation / checks (client) (push) Successful in 22m14s
Foundation / checks (tsan) (push) Successful in 24m30s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 41m43s
Foundation / checks (postgres) (push) Canceled after 41m39s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (deploy) (push) Successful in 4m10s
Foundation / checks (network) (push) Successful in 21m32s
Foundation / checks (client) (push) Successful in 22m14s
Foundation / checks (tsan) (push) Successful in 24m30s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 41m43s
Foundation / checks (postgres) (push) Canceled after 41m39s
This commit is contained in:
@@ -85,6 +85,14 @@ createdb evo_restore_twice
|
||||
PGDATABASE=evo_restore_twice bash "$root/tools/backup/restore-world.sh" --bundle "$work/bundle" \
|
||||
--objects "$work/twice-a" > /dev/null
|
||||
code=0
|
||||
# A restored database keeps the biological world/cuts but gets a distinct
|
||||
# evidence namespace before publication, including the isolated workflow.
|
||||
source_domain="$(psql -XAtc 'SELECT evolution.load_history_domain_v1()')"
|
||||
restored_domain="$(PGDATABASE=evo_restore_twice psql -XAtc 'SELECT evolution.load_history_domain_v1()')"
|
||||
[ -n "$restored_domain" ] && [ "$restored_domain" != "$source_domain" ] || fail 'restore reused source history domain'
|
||||
[ "$(PGDATABASE=evo_restore_twice psql -XAtc "SELECT parent FROM evolution.history_domains WHERE domain='$restored_domain'")" = "$source_domain" ] || fail 'restore lost parent domain'
|
||||
[ "$(PGDATABASE=evo_restore_twice psql -XAtc 'SELECT count(*) FROM evolution.history_domains d JOIN evolution.current_history_domain h USING(domain) JOIN evolution_restore.claims c ON d.request=c.nonce::uuid')" = 1 ] || fail 'restore lost claim/domain binding'
|
||||
[ "$(PGDATABASE=evo_restore_twice psql -XAtc "SELECT count(*) FROM evolution.history_domain_cuts d JOIN evolution.region_heads h USING(world_id,region_id) WHERE d.domain='$restored_domain' AND d.commit_sequence=h.commit_sequence AND d.commit_id=h.commit_id AND d.digest=h.digest AND d.end_tick=h.end_tick")" = 1 ] || fail 'restore lost exact cut provenance'
|
||||
PGDATABASE=evo_restore_twice bash "$root/tools/backup/restore-world.sh" --bundle "$work/bundle" \
|
||||
--objects "$work/twice-b" > "$work/twice.log" 2>&1 || code=$?
|
||||
[ "$code" = 4 ] && grep -q 'already has an evolution schema' "$work/twice.log" || fail "a second restore into one database"
|
||||
@@ -137,6 +145,7 @@ grep -q 'rolled back; the database was not changed (confirmed)' "$work/pair-a.lo
|
||||
createdb evo_restore_gate
|
||||
restore evo_restore_gate "$work/gate" EVO_RESTORE_TEST_HOOK='
|
||||
if [ "$1" = after-install ]; then
|
||||
psql -XAt -c "SELECT count(*) FROM evolution.history_domains d JOIN evolution.current_history_domain h USING(domain) JOIN evolution_restore.claims c ON d.request=c.nonce::uuid" > "'"$work"'/gate-domain.log"
|
||||
psql -XAt -c "SELECT * FROM evolution.acquire_region_lease(300, 1, 20000, decode(repeat('"'"'b1'"'"', 32), '"'"'hex'"'"'))" > "'"$work"'/gate-before.log" 2>&1 || true
|
||||
pg_ctl -D "$PGHOST/data" -m fast -w restart > /dev/null
|
||||
psql -XAt -c "SELECT * FROM evolution.acquire_region_lease(300, 1, 20000, decode(repeat('"'"'b1'"'"', 32), '"'"'hex'"'"'))" > "'"$work"'/gate-after.log" 2>&1 || true
|
||||
@@ -146,6 +155,7 @@ grep -q 'build not current' "$work/gate-before.log" && grep -q 'build not curren
|
||||
{ cat "$work/gate-before.log" "$work/gate-after.log" >&2; fail "authority was available before publication"; }
|
||||
[ "$(PGDATABASE=evo_restore_gate psql -XAtc 'SELECT count(*) FROM evolution.retained_builds WHERE retired_at IS NULL')" = 1 ] ||
|
||||
fail "publication did not restore the current build"
|
||||
[ "$(cat "$work/gate-domain.log")" = 1 ] || fail 'domain was not forked before verification/readmission'
|
||||
|
||||
# A committed install whose completion is lost is resolved from the claim and
|
||||
# verified, not reported as unchanged.
|
||||
|
||||
Reference in New Issue
Block a user