Total Batches shown for a job in the APex Jobs page is different from TotalJobItems value in AsyncApexJob query.

In the UI:

enter image description here

In the Query:

enter image description here

In the query result, TotalJobItems != JobItemsProcessed + NumberOfErrors

In the UI, Total Batches == Batches Processed + Failures

As per Salesforce documentation, TotalJobItems' label is Total Batches. So I don't think I'm comparing two different things.

enter image description here

Has anyone noticed such behavior before? Should I consider this as somehow 10 batches are not being processed?


Apparently this is a known issue:


When a batch Apex job fails due to an internal Salesforce exception, the batch Apex framework will retry the operation a limited number of times before aborting the whole job upon repeated failures. Due to this only some batches are getting processed and the other remain unprocessed and this batch job is not marked aborted both in UI and backend.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.