The station read model moves off RocksDB to an ETS table (design step 1a) #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (work): mcl-stations stops using RocksDB — its directory is served from one ETS table owned by a store process, and the service writes nothing to disk — so the RocksDB images can be deleted once every service is ported.
DECIDED 2026-11-23 (Raf): "we don't use rocksDB anymore", then "Port them off, then delete (Recommended)". This is step 1a of macula-io/macula-ci-images#19, the design's §2 "mcl-stations → ETS", frozen and passed (sha256 425c13eb…).
What lands:
set, keyed by the signer's key id, owned by a newstation_storeprocess; it does every read-modify-write, because a station'snode_recordandstation_endpointarrive independently and land in one row, so two writers would erase each other's fields;is_live/2the readers use — before, a lapsed row was skipped at serve time and kept forever;barrel_docdb, the rocksdboverridesblock inrebar.configandrocksdb_link_testsare removed; the images become the plain pair,macula-ci-otp(build) andmacula-pq-runtime(run), pinned by digest on the forge's own registry;MCL_DATA_DIRanddata_dir/0go.Still on the owner AFTER this lands, and deliberately not in this change: drop
/bulk0/mcl-stations:/datafrom beam03's compose and delete/bulk0/mcl-stationsonce the new version is healthy — 50 GB, nothing to keep. That is Raf's pin signature and goes through the Supervisor's menu.Refs macula-io/macula-ci-images#19
Purpose (work) met: mcl-stations no longer uses RocksDB — the directory is served from one ETS table owned by a store process, and the service writes nothing to disk.
It was already met on main before this package was picked up, by
e4f3186(2026-11-23 00:00Z) "store: the station read model moves from barrel_docdb to an ETS table". Its forge PR 2 was closed without a merge commit, which is why it read as unbuilt.Checked bullet by bullet against main
8ded83a:set,protected,named_table, keyed by the signer's key id, owned by the newstation_store; every write is a read-modify-write inside that process (store/2->lookup/1->project_node_record/2/project_station_endpoint/2), which is what keeps the two independently-arriving record types from erasing each other in one row;station_read_model:is_live/2says neither record is live (station_store:dead/4), the same function the readers use;sweep_now/0lets a suite drive it without sleeping;barrel_docdb, the rocksdboverridesblock inrebar.configandrocksdb_link_tests.erlare gone — no non-comment hit forbarrel_docdborrocksdbremains underapps/;macula-ci-otp(build) andmacula-pq-runtime(run), pinned by digest ongit.macula.io, andmcl_stations_service_testsguards both pins;MCL_DATA_DIRand nodata_dir/0underapps/; the supervisor starts the store before the feeder (rest_for_one);CHANGELOG.md's 0.7.0 entry records the change.Verified on msi00 in the pinned
macula-ci-otpdigest the sametest.ymluses (sha256:3e202cf7…), on main:rebar3 lintrc=0,rebar3 xrefrc=0,rebar3 eunitall 132 tests passed,rebar3 dialyzerrc=0.Both guards are tested, proven by mutation on main's code (source restored byte-identically after each):
lookup/1answeringundefined(the read half dropped), 4 tests fail by name, includingupsert_station_endpoint_leaves_node_record_fields_alone/1andupsert_node_record_leaves_endpoint_fields_alone/1.is_liveguard: inverted,a_sweep_drops_a_row_once_neither_record_is_live/1anda_sweep_keeps_a_row_while_one_record_is_live/1fail by name.Note on the first form of the RMW mutant: dropping the whole
lookupcall fromstore/2is not a kill in this repository — it leaveslookup/1unused andwarnings_as_errorsmakes that a compile error. It was re-expressed insidelookup/1instead. Same class as mcl-mail#12's M1 today.Still on the owner, as this issue says: drop
/bulk0/mcl-stations:/datafrom beam03's compose and delete/bulk0/mcl-stationsonce the new version is healthy — Raf's pin signature, through the Supervisor's menu.