Full Recalculate and RollupFullBatchRecalculator issues #467
-
Hi @jamessimone, first off thank you for your great work on this, it's much appreciated. We've been attempting to implement apex-rollup to replace our DLRS implementation, and come across some things that seems a little strange. We've created 2 custom metadata rollups as a test, and performed the full recalculate. They are COUNT and DISTINCT COUNT rollups. I've noticed however that many records are not calculated correctly after the full recalculate completed. If I go into the record and use the recalculate button, it calculates correctly, but not sure why the original recalculate didn't work. Also, I've been monitoring our Apex Jobs, and I notice the RollupFullBatchRecalculator job running very frequent. In fact, yesterday we almost hit our DailyAsync limit with this job being ~85% of the total. I'm wondering if you could help me understand what we should expect as the number of normal executions for this job and if you have any ideas that we could look into to resolve. For reference, we were on version 1.5.67 when the issue occurred. Upgrading to the latest version to see if that helps. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 48 replies
-
@randybarton24 if the job is running too frequently, it sounds like the default batch size may be timing out and restarting. You should only have the number of batches involved in the initial full recalc plus the number of inserts/updates/deleted as the full contribution from Apex Rollup to your async limits each day. Typically with issues like this, I ask for one of the Batch Apex logs generated during a full recalc with the Is Rollup Logging Enabled flag set to true, and with it set to false. (I like to ask for one without logging enabled because sometimes the logs get truncated when it is enabled). Then I get a flame chart going to analyze where the timeout is occurring and work with you to help optimize the process. Sometimes, that's as simple as lowering the Batch Chunk Size on your rollup control. I think the operation timing out is also responsible for you not seeing all of the appropriate field updates. Don't worry, we will get this figured out! |
Beta Was this translation helpful? Give feedback.
@randybarton24 I'm rolling out a new version which should address this issue. It was a bit difficult to reproduce the exact error you were getting, but I think based on the info you've supplied and the investigation I did that this is likely how the error was occurring.