5

A customer of my managed package is experiencing a long running batch job to change the number of total jobs during the run?

  1. How can that be?
  2. Is this an internal optimization at Salesforce?
  3. Or did other users delete records that were queried in start()?
  4. Should I open a case in such cases or can I rely on the status message "finished successfully"?
4
  • Found a similar (unanswered) question in the Salesforce Developer forum: developer.salesforce.com/forums/?id=906F000000091OZIAY Commented Jan 17, 2017 at 12:06
  • Sounds like a bug. Did you open a case?
    – Adrian Larson
    Commented Jan 17, 2017 at 12:11
  • 1
    Yes we did. (Case no. 15516557) I will report my results here. Commented Jan 17, 2017 at 12:30
  • 2
    Hmm wonder if you will get the "Developer support is not offered unless you have premier support. Please post your question on the developer forums. Case Closed".......I really hope they help you...
    – Eric
    Commented Jan 17, 2017 at 12:37

1 Answer 1

3

The root cause is platform bug described in this Known Issue:

In Spring'17 apex batch class (Database.Batchable) doesn't process all the batches if batch execute method takes long time to run but within limits. It stops processing batches after some number of processed records and finishes unexpectedly. No error is reported, no exception is thrown.

see Known Issue : Batch Apex job finishes unexpectedly in Spring'17 without processing all specified records

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .