Discussion
Jabil
US
Last activity: 29 Dec 2023 14:25 EST
Has anyone done this? Fun recipe to crash a node...
I just did something that probably uncovered an opportunity for a development environment / design-time enhancement. Has anyone else done this?...
- Create a data class used in a page list
- Create an autoloaded property in that class using "Refer to data page"
- Specify a data page to use in #2 that is configured with "Limit to single page"
- Exercise a section (or any code I guess) with the autoloaded property?
This code will enter an infinite loop that in my environment crashes the server! I presume it overflows the JVM heap.
It took me a while to diagnose because the logs cleared on the restart (Pega cloud), and the tracer bombs long before you can observe the problem.
The fix is simple: Configure the property autoload with "Copy from data page". In my case I also used "Do not persist".
Would it be possible for Pega to provide an enhancement to detect this "embedded page list + autoload + refer to + limit to single page"? It should at least result in a Severe guardrail warning. Better yet, fail validation and refuse to save. The runtime result is quite nasty and might escape diagnosis.
If that's not realistic, is it possible to detect and interrupt at runtime?