Skip to content

Commit e180140

Browse files
Remove advisory_lock comment in SchoolEmailDomain::Create
1 parent 528a359 commit e180140

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

  • lib/concepts/school_email_domain/operations

lib/concepts/school_email_domain/operations/create.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,6 @@ def call(school:, domain:, token:)
3737
private
3838

3939
def acquire_advisory_lock_for_school(school)
40-
# Advisory lock: queue school email domain creation for the same school so Profile
41-
# always gets a complete domain list. Released automatically on commit or rollback.
42-
#
43-
# lock_key is a CRC32 hash, so two different schools could theoretically share the same
44-
# key (~1 in 4 billion per pair). That wouldn't corrupt data — it would only queue
45-
# unrelated schools' updates briefly.
4640
lock_key = Zlib.crc32("#{LOCK_NAMESPACE}:#{school.id}")
4741
SchoolEmailDomain.connection.execute("SELECT pg_advisory_xact_lock(#{lock_key})")
4842
end

0 commit comments

Comments
 (0)