Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ pub(super) async fn execute_owned_batch(
.await?;
// Serving writers already hold the shared form of this lock. Keep the
// exclusive section short: at most one bounded batch, never the whole run.
sqlx::query("SELECT pg_advisory_xact_lock(community_deletion_lock_key($1))")
.bind(community)
sqlx::query("SELECT pg_advisory_xact_lock(hashtextextended($1, 0))")
.bind(crate::deletion::community_deletion_lock_key(
crate::CommunityId::from_uuid(community),
))
.execute(&mut *tx)
.await?;
crate::deletion::guard_community_write(&mut tx, crate::CommunityId::from_uuid(community))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ async fn reconnected_batch_still_bounds_lock_wait_and_loses_no_rows() {
// The next batch must install its own limits on its replacement connection.
session.acquire().await.unwrap().close().await.unwrap();
let mut blocker = db.pool().begin().await.unwrap();
sqlx::query("SELECT pg_advisory_xact_lock(community_deletion_lock_key($1))")
.bind(c.as_uuid())
sqlx::query("SELECT pg_advisory_xact_lock(hashtextextended($1, 0))")
.bind(crate::deletion::community_deletion_lock_key(c))
.execute(&mut *blocker)
.await
.unwrap();
Expand Down
9 changes: 6 additions & 3 deletions docs/trigger-retirement-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ now does in application code:

**A relay build at or after commit `279a31da` (the merge of
[#9397](https://github.com/block/buzz/pull/9397), which follows #9396) and
before `0094` is a required stop.** No tagged relay release contains it:
`relay-v0.3.0` does not, so a deployment on a tagged release must move to a
stop build first. Follow the same procedure as above. An older relay that
before `0094` is a required stop.** Builds from commit `a8f55e63` (the merge
of [#9363](https://github.com/block/buzz/pull/9363)) up to the merge of
[#9615](https://github.com/block/buzz/pull/9615) do not qualify: their user
content cleanup still calls `community_deletion_lock_key`. No tagged relay
release is a stop build: `relay-v0.3.0` is not, so a deployment on a tagged
release must move to a stop build first. Follow the same procedure as above. An older relay that
still serves after `0094` fails every write and deletion that takes the community deletion lock, with
`42883 community_deletion_lock_key(uuid) does not exist`, and its profile name
search fails with `42883 profile_name_fields(text) does not exist`.
Expand Down
Loading