carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package provision
2
3// Record-write census entries for db region forward plan 2, layered on
4// s3ChangeIndexWriteCensusInventory (main's last at 26fbd042). census-ruling-db-region-forward-2, accepted
5// in full by the census owner on #280
6// (docs/superpowers/notes/census-proposal-db-region-forward-2.md). The reads
7// route is one more key-site line in registerCLIRoutes, and NewServer sets
8// the forwarded read's limits and timing beside the db door's; the request,
9// the queue entry and cancel are conditional creates under db-reads/ in the
10// deployment bucket (admitDBRead, cancelDBRead), never an instance or
11// sidecar record: nonrecord. There is no Delete site.
12func dbRegionForward2WriteCensusInventory() []censusEntry {
13 entries := append([]censusEntry(nil), s3ChangeIndexWriteCensusInventory()...)
14 replacements := []censusEntry{
15 {"internal/console/authcli.go", "Server.registerCLIRoutes", "key-site", "lit:instances,lit:sidecars", "35d3200c17e185d556104b3e2662f3ceea3c862b0b4baeeb9c40753db63a7a2e"},
16 {"internal/console/server.go", "NewServer", "key-site", "lit:instances", "7493342296b6dfa6bc6d2e68e3789fad49e400dbb32a012cee09e215089aa473"},
17 {"internal/console/apidbforward.go", "Server.admitDBRead", "nonrecord", "sel:Put", "88e0c06d0210f123d1201642919ac29487053fe1b5225b9e6f65da528b12389c"},
18 // BumpSerial checks its context before every write (Astra round 1, P2);
19 // still a nonrecord Put of control/serial.
20 {"internal/release/serial.go", "BumpSerial", "nonrecord", "sel:Put", "3a85292a5c882fa0d5c10cda06bcef916d033f8adc07db36c6f29bedaed54e72"},
21 {"internal/console/apidbforward.go", "Server.cancelDBRead", "nonrecord", "sel:Put", "6d98027ee782321cfbc7cb2c45cf856b959b2c4cd27d95dfbb8a5753fdfbd3a8"},
22 }
23 for _, r := range replacements {
24 found := false
25 for i, e := range entries {
26 if e.File == r.File && e.Unit == r.Unit {
27 entries[i], found = r, true
28 }
29 }
30 if !found {
31 entries = append(entries, r)
32 }
33 }
34 return entries
35}
36