declarative-lookup-rollup-summaries icon indicating copy to clipboard operation
declarative-lookup-rollup-summaries copied to clipboard

No Jobs Scheduled but "Lookup Rollup Summary Schedule Items" Being Created

Open jessicapethick opened this issue 2 years ago • 7 comments

Have completely reinstalled the app, deactivated and reactivated all rollups, have uninstalled and reinstalled child triggers and all rollups are in realtime mode but summary schedule items are still being created. Help?

jessicapethick avatar Feb 13 '23 03:02 jessicapethick

What does the CalculationMode field look like for the CMDT records? They should all be set to Realtime. If any are set to scheduled and active it will create scheduled items. You can look in the list view for custom metadata records to see what the value is set to.

sfenton3 avatar Feb 22 '23 16:02 sfenton3

Yes @sfenton3 all the calculation modes are set to realtime. They have always been set to realtime, and were never scheduled. Yet it appears to be creating a scheduled item every time a record is updated. At the time I noticed, DLRS scheduled items were using 20% of the org's storage limits. I cleared them out, and yet they haven't stopped creating. What other reason could there be for this?

Screen Shot 2023-02-27 at 7 27 20 am Screen Shot 2023-02-27 at 7 27 05 am

jessicapethick avatar Feb 26 '23 23:02 jessicapethick

Copy and paste the lookup rollup summary: m029q... And m025g... into the url. Those are your lookup rollup summaries that are scheduled. If they are still realtime I would delete them and create again.

sfenton3 avatar Feb 28 '23 21:02 sfenton3

It's also possible to add scheduled items to the scheduled item queue through apex - though it is not typical.

sfenton3 avatar Feb 28 '23 22:02 sfenton3

I'm going to close this out - If you have any other questions feel free to re-open this issue.

You can also go to the Trailblazer community group for DLRS with questions.

sfenton3 avatar Mar 11 '23 01:03 sfenton3

@sfenton3 i just saw this in person at SED and it is very weird. not old records data records and all the new CMDT ones are set to Realtime.

JimBTek avatar Jun 30 '23 20:06 JimBTek

Hi Jim,

Was great meeting you at the SED event, and thanks for having a look at this while there.

Has there been any update on how we might fix it?

Kind Regards,

  • Jessica Pethick *

  • Meandr Consulting * Phone: +1 (307) 761 9239 <+1(307)7619239> Email: @.*** Website: www.meandr.com.au

https://www.linkedin.com/in/jessicapethick/ https://twitter.com/jessicapethick https://wa.me/61424113754

On Fri, Jun 30, 2023 at 2:35 PM Jim Bartek @.***> wrote:

Reopened #1300 https://github.com/SFDO-Community/declarative-lookup-rollup-summaries/issues/1300 .

— Reply to this email directly, view it on GitHub https://github.com/SFDO-Community/declarative-lookup-rollup-summaries/issues/1300#event-9691704364, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3MEPMYM57N2ZC3NY6BYN6TXN4Z73ANCNFSM6AAAAAAUZYLA5Q . You are receiving this because you authored the thread.Message ID: <SFDO-Community/declarative-lookup-rollup-summaries/issue/1300/issue_event/9691704364 @github.com>

jessicapethick avatar Aug 03 '23 20:08 jessicapethick

@jessicapethick I think this has gotten left behind a bit. Is this still happening? If so I'd love to understand what is going on and hopefully find a fix.

aheber avatar May 06 '24 23:05 aheber

I'll be happy to work on this if you come back to it. In the mean time I'll mark it as closed.

aheber avatar May 22 '24 16:05 aheber

@aheber just wanted to reach out to say I'm having the same issue (Schedule Items being created for "Realtime" rollups) and I haven't been able to figure out why. Spot checked a few to confirm they don't have any associated Scheduled Jobs that are active. At least some of them I can confirm have always been set to Realtime and not Scheduled. Any troubleshooting tips would be appreciated! 🙏

bbromberg avatar May 28 '24 21:05 bbromberg

@bbromberg can you replicate these on demand or do they just show up sporadically?

Have you checked both the older Custom Object rollup definitions as the newer Custom Metadata definitions?

I don't have the ability to do a support login to debug the packaged code but if you could capture a debug log of it occurring we might be able to find a culprit, or at least a hint.

aheber avatar May 28 '24 21:05 aheber

Looking at the code paths, it seems like this is expected behavior related to merging.

https://github.com/SFDO-Community/declarative-lookup-rollup-summaries/blob/5122ae3e0577ee0fe1f6372b425492e82f15e0a8/dlrs/main/classes/RollupService.cls#L934

If that block sees any merged records then it will trigger this block with a true https://github.com/SFDO-Community/declarative-lookup-rollup-summaries/blob/5122ae3e0577ee0fe1f6372b425492e82f15e0a8/dlrs/main/classes/RollupService.cls#L1157

If that comes in true then it triggers this, https://github.com/SFDO-Community/declarative-lookup-rollup-summaries/blob/5122ae3e0577ee0fe1f6372b425492e82f15e0a8/dlrs/main/classes/RollupService.cls#L1188

This means instead of following instructions, everything should be processed as a scheduled rollup because the merge does weird things and we just want to worry about it later so enqueue all the scheduled records.

That is the only rational explanation I see from following the code. If that fits your situation then I think DLRS is behaving as expected, just surprising.

If that doesn't match what you're seeing then let me know and we can try and find another cause.

aheber avatar May 28 '24 21:05 aheber

I'm going to mark this as closed. I think there is a reasonable explanation but I'll open another ticket for the docs team to make sure this is clearly laid out in the docs. It would also be good if the config management screens made it clear you'd need a scheduled job if the parent is mergable.

aheber avatar Jul 04 '24 19:07 aheber