Last entity is not getting processed in batch worker

Created on 7 March 2023, over 1 year ago
Updated 19 February 2024, 7 months ago

Problem/Motivation

Entity at the last position is not getting processed in batch worker when the first positioned entity have more equal to 15 (= REVISION_BATCH_SIZE) revisions.

Steps to reproduce

1. Configure module
- source entity type = node
- target entity type = block_content
2. Make sure the oldest node entity have more than/equal to 15 ( = REVISION_BATCH_SIZE) revisions.
3. Generate usage statistics
- Click on "Recreate all entity usage statistics" button under batch update local menu tab.
4. Compare statistics generated by "batch process" with statistics generated by "queue".

Proposed resolution

Statistics generated by "batch process" method should match with statistics generated by "queue" method.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

🇮🇳India gaurav_manerkar Vasco Da Gama, Goa

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India gaurav_manerkar Vasco Da Gama, Goa

    Please review

  • Status changed to Needs work 7 months ago
  • 🇪🇸Spain marcoscano Barcelona, Spain

    Thank you for reporting and for suggesting a fix. I haven't had a chance to look into the MR, but we do have a batch test ( \Drupal\Tests\entity_usage\FunctionalJavascript\BatchUpdateTest ), so it would be great if you could reproduce the failure in a test-only patch, and then we can use that as improved test coverage for this fix.
    Thanks!

Production build 0.71.5 2024