Fix progress message when batch updating

Created on 31 January 2025, 22 days ago

Problem/Motivation

I'm not sure if this was introduced in the latest changes we landed to improve performance, but I just noticed that our message 'Updating entity usage for @entity_type: @current of @total' is not accurate / useful. Currently both numbers @current and @total increase in each iteration of the batch. The expectation is that the total would remain stable so users get real feedback about the progress. If the current approach makes it impossible or too hard to provide a stable total, we should just remove it altogether IMO.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @marcoscano
  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ

    The numbers only should change if you create or update content while the batch is in progress.

  • πŸ‡¬πŸ‡§United Kingdom alexpott πŸ‡ͺπŸ‡ΊπŸŒ
    >  [notice] Truncated the entity usage table
    >  [notice] Created the entity usage bulk table
    >  [notice] Updating entity usage for block_content: 8 of 8
    >  [notice] Updating entity usage for node: 200 of 306574
    >  [notice] Updating entity usage for node: 400 of 306574
    >  [notice] Updating entity usage for node: 600 of 306574
    >  [notice] Updating entity usage for node: 800 of 306574
    >  [notice] Updating entity usage for node: 1000 of 306574
    >  [notice] Updating entity usage for node: 1200 of 306574
    >  [notice] Updating entity usage for node: 1400 of 306574
    >  [notice] Updating entity usage for node: 1600 of 306574
    >  [notice] Updating entity usage for node: 1800 of 306574
    >  [notice] Updating entity usage for node: 2000 of 306574
    >  [notice] Updating entity usage for node: 2200 of 306574
    >  [notice] Updating entity usage for node: 2400 of 306574
    

    Is what I'm seeing when on the latest dev version of entity usage.

  • πŸ‡ͺπŸ‡ΈSpain marcoscano Barcelona, Spain

    Yeah I was testing through the UI, and admittedly my environment might have been polluted by different testing in different branches, stopping, resuming, etc. Paragraph total numbers were still increasing as the batch progressed, for some reason.
    I nuked everything, and in a fresh install, I can no longer reproduce, so for now I'm blaming my testing which probably wasn't accurate enough.
    Thanks for checking!

Production build 0.71.5 2024