Skip to content

[Badges] The system creates too many BadgeProgress records per learner that floods DB #2985

@GlugovGrGlib

Description

@GlugovGrGlib

Description

The current badge processing flow creates BadgeProgress records while checking whether a learner has already completed a badge template.

As a result, the system can create progress rows even when the learner has not actually fulfilled any requirement. This likely explains how a deployment can issue relatively few badges while still accumulating a very large number of badge progress records.

Supporting Info

BadgeProgress uses the get_or_create() method in each process_requirements() check.
There is also a second path through grouped requirement checks that can create progress records during evaluation.

Expected Result

BadgeProgress records should be created only when a learner actually earns or loses progress toward a badge.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions