SFDO-Community / declarative-lookup-rollup-summaries

Declarative Lookup Rollup Summaries (DLRS) is a community built and maintained Salesforce application that allows you to create cross object roll-ups declaratively - no code! For install instructions and documentation, visit our website https://sfdo-community-sprints.github.io/DLRS-Documentation/
https://sfdo-community-sprints.github.io/DLRS-Documentation/
BSD 3-Clause "New" or "Revised" License
683 stars 235 forks source link

Optimizer WARNING Status #1393

Closed Rabindra-LIO closed 1 month ago

Rabindra-LIO commented 8 months ago

Hi Team,

After the upgradation of the DLRS app to 2.19 version, we started getting Status as WARNINGS under lookup rollup summary tools tab of the app. It says "There are 5000 Scheduled Items - Clear or Schedule the Lookup Rollup Summary Schedule Items. You are using an estimated 9 MB of data storage."

This is causing because the old jobs are not getting deleted after the execution, and we cannot manually delete them as they are many - 5000 plus. Please look into this and help me to sort this error. Please find the attached snap for reference.

image

Thanks, Rabindranath

sfenton3 commented 8 months ago

Hi Rabindranath, This warning is just indicating that you have a large number of Lookup Rollup Summary Schedule Items. These are generated each time a child record is updated, deleted, or created in a Lookup Rollup definition. Typically if you are generating these records, you must consume them to rollup the data on the parent record.

This warning is just letting you know that if you have a large number of scheduled items in the queue then you are either not consuming them (The Rollup Job apex class is not scheduled). Or, the class is scheduled but you are running it infrequently and building up a large number of scheduled items that need to be consumed.

I will take a look at the optimizer and make it a little more conservative, so that it does not pick up scheduled items that are less than three days old. Let me ask you a few questions, are you running the Apex class RollupJob to consume the Scheduled Items? Or, are these old scheduled items that were never processed? Perhaps, you are not running the scheduled item class often enough?

This is the wiki article that goes over scheduled calculate mode.

This is an image of the DLRS tab for Lookup Rollup Summary Schedule Items and what they look like.

Screenshot 2023-10-13 at 12 50 43 PM

Rabindra-LIO commented 8 months ago

Hi Scott, Thank you for your response. We received this warning message after upgrading the version of DLRS. We built 64 DLRS jobs and scheduled them to run every day. Untill now we didn't received any error messages indicating that scheduled jobs were not completed.

To clarify, we didn't create any separate apex class rollup jobs. Whatever we developed for DLRS jobs was done using the DLRS interface (Manage Lookup Rollup summary). And our SF system administrator recently left our organization. As you understand, I'm new to it and unclear about Apex class Rollup Jobs creation. However, the attached snips may assist you in comprehending. And if you mentioned something specific to check with process direction, I'll try to discover it and come back to you. DLRS scheduled jobs Rollup apex classes

Furthermore, I examined the Lookup Rollup Summary Schedule Items report and discovered that there are numerous stated tasks that have existed since 01/02/2019. DLRS schedules items report

And, if feasible, I would like to connect with you via online call, such as teams, Google Meet, or similar, to better understand. It might help us solve this problem swiftly.

Many Thanks.

Rabindra-LIO commented 8 months ago

Hi @sfenton3 , Is there any update on it? If require I would like to connect with you via online call, such as teams, Google Meet, or similar, to better understand and sort this out ASAP.

Thanks & regards, Rabindranath

sfenton3 commented 8 months ago

Hi Rabindranath, I wanted to clarify that your schedule jobs are not broken and are running fine if you have not received any email about them.

The scheduled item records seem quite old and I would not be concerned about them as long as you don't have too many. The Warning is just letting you know they are using up org data if the scheduled items are not consumed/deleted.

I would look at your rollup definitions and identity any that have a calculation mode of scheduled and are active. If any are scheduled and active then you should schedule the RollupJob.cls class to run. Otherwise, you don't need to do anything.

Scheduled full calculate is different than running the RollupJob.cls and don't effect the other.

aheber commented 1 month ago

I'm going to mark this as closed. In the future I think this would be prevented by #1470 to help keep those scheduled item records cleaned up.

If you need additional help I'd recommend you reach out to the Trailblazer Community Group.