Raise a check's store without durability and remove what earlier holders left (hq issue 306)
mesh/merge-gate pass: builds build-agent, mesh-controller, route-proxy → ace, g14, novox, shanks; no bus step; every machine composes with the change as it…
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered

On the control node the store-bound packages of the controller's suite ran
five to seven times slower than on any other holder, and every controller
check that landed there ran past the suite's thirty minutes: a throwaway
store flushing to a disk the mesh's own store, bus and forge keep busy.
A store that lives for one check needs no crash safety.

A holder recreated mid-check left the check's store and bus running, and
the redelivery went to another machine, so nothing removed them: eleven
pairs across four machines. A starting holder has taken nothing, so every
container labelled with an ask of the seat is an earlier holder's.
This commit is contained in:
jochen
2026-10-08 10:20:28 +02:00
parent c714d07739
commit 85b2a1855b
7 changed files with 178 additions and 1 deletions
+37
View File
@@ -33,6 +33,43 @@ func TestTheStoreAndBusAChecksStandsOnAreTheOnesTheMeshRuns(t *testing.T) {
}
}
// **Issue 306**: the throwaway store is raised without durability — it lives for one check — so a suite
// that makes a database per test does not wait on the disk of a busy machine for every flush.
func TestTheThrowawayStoreFlushesNothing(t *testing.T) {
said := strings.Join(StoreSettings, " ")
for _, want := range []string{"-c fsync=off", "-c synchronous_commit=off", "-c full_page_writes=off"} {
if !strings.Contains(said, want) {
t.Errorf("the store is raised with %q, not %q", said, want)
}
}
if os.Getenv("MESH_TEST_DOCKER") != "1" {
t.Skip("MESH_TEST_DOCKER=1: the settings are proven on a raised store")
}
id := fmt.Sprintf("check-store-%d", time.Now().UnixNano())
labelledRun := Labelled(Command, id)
t.Cleanup(func() { _, _ = RemoveContainersOf(context.Background(), Command, id) })
if _, err := throwaway(t.Context(), labelledRun, Command, id+"-store", StoreImage("17.11"), 5432,
[]string{"-e", "POSTGRES_PASSWORD=check"}, StoreSettings); err != nil {
t.Fatal(err)
}
if err := waitFor(t.Context(), Command, id+"-store", []string{"pg_isready", "-U", "postgres"}); err != nil {
t.Fatal(err)
}
for setting, want := range map[string]string{"fsync": "off", "synchronous_commit": "off", "full_page_writes": "off"} {
var got string
for try := 0; try < 10; try++ {
out, err := exec.Command("docker", "exec", id+"-store", "psql", "-U", "postgres", "-tAc", "SHOW "+setting).CombinedOutput()
if got = strings.TrimSpace(string(out)); err == nil {
break
}
time.Sleep(500 * time.Millisecond)
}
if got != want {
t.Errorf("%s is %q on the raised store", setting, got)
}
}
}
// aRepository is a git repository holding these files, committed, and its head.
func aCheckedRepository(t *testing.T, files map[string]string) (string, string) {
t.Helper()