File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -328,19 +328,6 @@ pub async fn set_canvas(
328328 Ok ( ( ) )
329329}
330330
331- /// Namespace for the per-channel membership advisory lock. Serializes the
332- /// role-authorization + last-owner-count + write sequences in [`add_member`]
333- /// and [`remove_member`] against each other.
334- ///
335- /// Both functions read an owner COUNT and then write a *different* row than the
336- /// one they counted, so `READ COMMITTED` snapshot isolation alone permits two
337- /// concurrent demotions (or a demotion racing a removal) to each observe two
338- /// owners, each pass, and together leave zero — the exact governance loss the
339- /// guards exist to prevent. An advisory key rather than `SELECT ... FOR UPDATE`
340- /// on the channel row: membership is its own contention domain and must not
341- /// serialize against unrelated channel metadata writers (`update_channel`,
342- /// `set_topic`, the TTL transition). Distinct key domain from
343- /// `buzz_channel_ttl:`.
344331/// Lists channels in a community, optionally filtered by visibility string.
345332pub async fn list_channels (
346333 pool : & PgPool ,
Original file line number Diff line number Diff line change @@ -32,6 +32,19 @@ pub struct MemberRecord {
3232 pub removed_at : Option < DateTime < Utc > > ,
3333}
3434
35+ /// Namespace for the per-channel membership advisory lock. Serializes the
36+ /// role-authorization + last-owner-count + write sequences in [`add_member`]
37+ /// and [`remove_member`] against each other.
38+ ///
39+ /// Both functions read an owner COUNT and then write a *different* row than the
40+ /// one they counted, so `READ COMMITTED` snapshot isolation alone permits two
41+ /// concurrent demotions (or a demotion racing a removal) to each observe two
42+ /// owners, each pass, and together leave zero — the exact governance loss the
43+ /// guards exist to prevent. An advisory key rather than `SELECT ... FOR UPDATE`
44+ /// on the channel row: membership is its own contention domain and must not
45+ /// serialize against unrelated channel metadata writers (`update_channel`,
46+ /// `set_topic`, the TTL transition). Distinct key domain from
47+ /// `buzz_channel_ttl:`.
3548const CHANNEL_MEMBERSHIP_LOCK_NAMESPACE : & str = "buzz_channel_membership:" ;
3649
3750/// Verify that migration 0032's roster fence is active on the partitioned
You can’t perform that action at this time.
0 commit comments