Object Relational Mapping Layer Bulk Save Fault Recovery
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional database systems lack efficient bulk save operations, leading to inefficiencies when saving multiple items to a database, particularly due to the inability to handle faults and side effects effectively.
Innovation Solution
Implementing mechanisms and methods through an object relational mapping layer to save multiple rows together, detecting faults, and recovering by forming new sets of rows that can be saved without errors, ensuring no side effects occur from failed rows by deferring execution until all rows are successfully saved and committed.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If bulk save operations are implemented to save multiple rows together, then productivity is improved, but reliability deteriorates due to inability to handle faults effectively
Solution Approach 1:
The bulk save operation is divided into individual row save operations within a transaction. Each row can be processed independently, and if a fault occurs, only the affected row or minimal set of rows needs to be retried, while other rows can continue processing. This segmentation allows the system to maintain high productivity through bulk operations while improving reliability by isolating fault impacts.
Solution Approach 2:
The system implements fault detection mechanisms that monitor save operations and provide feedback when errors occur. When a fault is detected in a bulk save operation, the system identifies the specific failed rows, rolls back only those operations, and retries them separately. This feedback loop ensures that productivity is maintained through continued processing of successful rows while reliability is improved through targeted fault recovery.
2Manufacturing precision
If all rows are saved together in a single transaction, then manufacturing precision is improved, but loss of time increases due to rollback of entire transaction on any fault
Solution Approach 1:
Instead of treating the bulk save as a single atomic transaction, the system segments it into individual row-level operations. This allows partial commits where successfully saved rows are committed immediately, while only failed rows are rolled back and retried. This segmentation maintains data consistency for successful operations while minimizing time loss by avoiding complete transaction rollbacks.
Solution Approach 2:
The system performs partial commit actions by saving and committing rows that succeed in the bulk operation, rather than waiting for all rows to be processed. Rows that fail are identified and retried separately. This partial action approach maintains manufacturing precision by ensuring committed rows are consistent while reducing time loss by not waiting for or rolling back the entire transaction.
3Reliability
If conventional save operations are used for each row individually, then reliability is improved, but productivity deteriorates due to inefficiency with high number of items
Solution Approach 1:
The system merges multiple individual row save operations into a single bulk save operation that processes multiple rows together. This combining approach improves productivity by reducing the overhead of repeated individual save operations. The reliability of individual row saves is maintained through transaction control and fault isolation mechanisms that ensure each row's data integrity even when processed in bulk.
Solution Approach 2:
The system introduces an intermediary bulk processing layer that sits between the application and the database. This intermediary handles the coordination of multiple row saves, providing both the productivity benefits of bulk operations and the reliability benefits of individual row processing through transaction management and error isolation. The intermediary translates individual save requests into efficient bulk operations while maintaining data integrity.
Data Source
AI summary
Embodiments may recover from faults by forming a new set of rows by removing rows associated with faulting save operations and repeating the saving and forming operations using the new set of rows until a set of rows that can be saved from the known start state without fault is determined. When the subset of successful rows is found, embodiments are able to provide assurance that no side effects (i.e., code or operations triggered by saving of a data to a particular location) have been executed on behalf of any of the failed rows (side effects from custom PL/SOQL code included) by deferring execution of triggers until an entire set of rows can be saved and committed.


