Skip to content

🐛(Bug) Mention email dropped when the cache is unreachable #2800

Closed

Description

@AntoLC

The mention email is silently dropped when Redis is unreachable: Mention.notify reads a falsy cache.add() as "guard already taken", but with IGNORE_EXCEPTIONS=True (the Production default) django-redis returns None on a connection error, while an existing key gives False.

# Guard against concurrent notification tasks for the same context.
# cache.add is atomic on the shared Redis backend: only the first task
# acquires the key and proceeds, the others get False
if not cache.add(
self.notification_guard_key,
str(self.pk),
timeout=MENTION_NOTIFICATION_GUARD_TIMEOUT_SECONDS,
):
return False

Suggested fix: only skip when cache.add(...) is False, so an unavailable cache sends the email (the guard is best-effort), as done for the thread reply notification in Comment.notify_thread_participants.

Activity

  1. added theissue type on Oct 8, 2026
  2. maboukerfa commented on Oct 8, 2026

    @maboukerfa
    Contributor

    i will work on this

  3. moved this from To do to Done in LaSuite Docson Oct 20, 2026
  4. closed this as completedby moving to Done in LaSuite Docson Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions