Skip to content

Remove one-time pending-self-remove task backfill in ClientBuilder::build #3748

Description

@insipx

What

backfill_pending_self_remove_tasks in crates/xmtp_mls/src/builder.rs is a one-time migration: on build() it seeds a ProcessPendingSelfRemove TaskRunner task for every group still flagged with a pending leave request (get_groups_have_pending_leave_request).

Why it exists

Self-removal moved from a poll-based worker to event-driven tasks enqueued when a LeaveRequest is processed (#3744). Pending-remove state recorded before that change has no incoming LeaveRequest to re-fire, so the backfill seeds tasks for it. Deduped per group + best-effort (logged, never fails the build).

When to remove

Once every client has shipped a release that enqueues these tasks inline (i.e. #3744's behavior is ubiquitous), the backfill is dead weight — there can be no pre-event-driven pending state left. Safe to delete by the next-next stable release.

How to remove

  • Delete backfill_pending_self_remove_tasks and its call in the TaskRunner registration block in builder.rs.

Tracked via change-on-release.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions