diff options
Diffstat (limited to 'src/db/mod.rs')
| -rw-r--r-- | src/db/mod.rs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/db/mod.rs b/src/db/mod.rs index 27d1bfb..6f15c88 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -4,9 +4,7 @@ pub mod candidates; pub mod migrations; pub mod model; -// The queries this module owns, one module per aggregate. They are private: -// the interface is what `pub use` names below, not the file layout, so a -// caller cannot reach a query that was not chosen for export. +// One private module per aggregate; the interface is the `pub use` below. mod audit; mod invariants; mod metrics; @@ -24,9 +22,7 @@ mod staleness; mod subscriptions; mod world; -/// The alias is only ever used from outside `db`, and only by the test tier; -/// `db::migrate` walks `migrations::MIGRATIONS` by its own path, so there is -/// no crate-internal alias to keep in a production build. +/// Aliased only for the test tier; `db::migrate` walks `MIGRATIONS` by its own path. #[cfg(feature = "test-support")] pub use migrations::MIGRATIONS; /// Its only caller is the test-tier `world_members`, so it is gated with it. @@ -43,8 +39,7 @@ pub use metrics::{ count_subscriptions, count_unacknowledged_notices, last_gc_age_secs, last_poll_age_secs, oldest_queued_age_secs, pending_review_ages_secs, }; -/// `ReleaseState` is a column type on the release row. Nothing outside `db` -/// names it, so the alias out of `db` exists only for the test tier. +/// A column type on the release row; nothing outside `db` names it. #[cfg(feature = "test-support")] pub use model::ReleaseState; #[cfg(not(feature = "test-support"))] @@ -249,11 +244,8 @@ impl Writer { self.tx.send(Msg::Call(f)).map_err(|_| Error::db("writer actor gone")) } - /// Stop the writer actor. - /// - /// Test-tier only: the server runs until the process ends and never - /// quiesces the writer deliberately. Tests use it to prove a worker - /// that dies mid-write leaves the database consistent. + /// Stop the writer actor. The server never quiesces it; tests use this to + /// prove a worker that dies mid-write leaves the database consistent. #[cfg(feature = "test-support")] pub fn shutdown(&self) { let _ = self.tx.send(Msg::Shutdown); |
