Run save-to-database processes concurrently
Save-to-database processes within an Axiom file now run concurrently by default, instead of sequentially. This may improve file performance in files with many save-to-database processes, or when a handful of save-to-database processes save many records.
Save-to-database blocks are still identified and triggered using the same order as in previous versions:
-
Each sheet is processed in the order they are listed on the Control Sheet.
-
Within a sheet, Axiom searches for save-to-database tags by row from left to right, starting at the first row and then moving down. If the tags are numbered, then the save blocks are processed in numeric order, otherwise they are processed in the order found.
When Axiom Software identifies a save block to be processed, it now triggers a background task to handle the save instead of waiting for the save to finish. It then immediately moves on to identify and trigger the next save block, so that multiple saves are run concurrently.
In order to automatically handle dependent save-to-database processes, the following exceptions apply:
-
Reference tables: If the destination table for the save block is a reference table, Axiom Software triggers the background task for the save but then waits for all current tasks to complete before moving on to the next save block. This behavior is intended to handle cases where records are saved to a reference table, and then a subsequent save references the new or updated records.
-
Save Type 4: If the save block is SaveStructure2DB (Save Type 4) instead of Save2DB (Save Type 1), Axiom Software triggers the background task for the save but then waits for all current tasks to complete before moving on to the next save block. This behavior is intended to handle cases where subsequent save blocks depend on the changes made using Save Type 4.
-
Axiom query: If the save block triggers an Axiom query to be run before the save-to-database occurs, Axiom Software waits for all current tasks to complete before continuing. Once all tasks are complete, Axiom Software runs the specified Axiom query and then triggers the background task for the save. This behavior is intended to handle the case where the Axiom query is returning records that may be impacted by a previous save block.
-
Same data table: If the destination table for a save block is the same destination data table as a previous save block, Axiom Software triggers the background task for the save but does not start processing it until the task for the previous save block to the table has been completed. This behavior is intended to prevent database errors that could result if both save blocks attempted to add or update the same records at the same time.
Additionally, because save blocks are now processed concurrently, the point at which the save-to-database process stops due to error may be different. In previous releases, Axiom Software stopped processing save blocks after encountering the first error. Because multiple save blocks may already be in process when an error is encountered, those processes will continue. However, no new save blocks will begin processing after the error.
NOTE: The parallel save behavior only applies when a user executes a save from within a file, to improve performance when communicating between the client and the application server. When a file is processed server-side using Scheduler and a save-to-database occurs, all saves are executed sequentially.
Upgrade considerations
When you upgrade, the new parallel save behavior is automatically enabled and applies to all Axiom files. This new behavior has been carefully designed so that there should be no adverse impacts to your existing save-to-database processes. In some cases, you may see a performance improvement.
However, because of the wide variety of use cases and options for save-to-database processes, it is possible that there may be an edge case that the new behavior does not handle. If an edge case is identified, it is possible to disable the behavior on a per file basis, or for the entire system:
-
Per File: To disable the new behavior for a particular file, set Enable parallel save data to Off on the Control Sheet. For existing files, you must upgrade your Control Sheet to gain access to this setting.
New setting to disable the default parallel save behavior for a file
-
System-Wide: To disable the new behavior for an entire system, set the system configuration setting ParallelSaveEnabled to FALSE. For information on how to modify the system configuration settings, see System configuration settings.
If you do identify an edge case, please inform us about it so that we can consider further changes to the parallel save behavior.