[Advance Query] Issue with concurrent advance query calls
Web icon
Forge component by Paulo Fagundes Jr.
Application Type

Hello Paulo.  We've discovered an issue with the way this extension handles parameters, owing to the way Outsystems loads extensions.  This may be exclusive to Reactive but I'm not sure.

The issue as we discovered it arose when we had multiple webblocks, each with an independent Advance Query call, all loading asynchronously on the same page.  Sometimes the data wouldn't come back in one or more of the blocks.  The root cause is the fact that the Parameters dictionary is a global variable.  When one webblock finishes its ExecuteSelect, it will clear out the Parameters dictionary in the "finally" step.  If other webbblocks are in between AddParameter and ExecuteSelect, the Parameters dictionary will be empty by the time they get to it.

We discovered with a different extension that Outsystems will load a single instance of an extension and share that running instance for everyone on the server.  So while we were able to fix this case pretty easily, we know from experience that in a high load situation, other users, even if using other modules, could all be trying to share the same extension instance.  This behavior isn't documented anywhere that we could find.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.