Batched Work Commit Override via Backout Threshold
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Batch processing in message-driven transactional applications leads to inefficiencies due to costly disk forces and potential errors causing entire batches to be backed out, resulting in performance delays and lock escalation issues under heavy load.
Innovation Solution
Implementing a checker and override component to conditionally override the Commit Count, allowing partial batch commitment when the Backout Count is greater than zero but below the Backout Threshold, ensuring only error messages are queued for failure and maintaining message sequence.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If batch processing is implemented to improve efficiency by reducing disk forces, then processing speed is improved, but reliability deteriorates because errors cause entire batches to be backed out
Solution Approach 1:
The patent segments the batch processing into two independent paths: a fast path for successful commits and a slow path for error handling. The fast path processes batches of 50 messages without individual commits, while the slow path handles errors one message at a time with full transactional commits. This segmentation allows the system to achieve high throughput for successful messages while maintaining reliability for error cases.
Solution Approach 2:
The patent applies partial action by committing only the successful messages in a batch while allowing failed messages to be retried separately. Instead of committing or backing out the entire batch, the system commits partial results (successful messages) and isolates failed messages for separate error handling, thus achieving partial commitment of the batch unit of work.
2Productivity
If batch size is increased to reduce commit frequency, then processing efficiency is improved, but lock escalation issues worsen under heavy load
Solution Approach 1:
The patent segments the batch processing into two distinct paths with different batch sizes: the fast path uses batches of 50 messages for efficient processing, while the slow path handles error messages individually. This segmentation prevents lock escalation by ensuring that even under heavy load, no single transaction holds locks for excessively long periods, as failed messages are processed separately with smaller effective batch sizes.
3Reliability
If individual commits are performed for each message to ensure reliability, then transaction reliability is improved, but processing speed deteriorates due to frequent disk forces
Solution Approach 1:
The patent introduces an intermediary error handling path that acts as a mediator between the fast batch processing path and the reliable individual commit path. Successful messages are processed in batches without individual commits (fast path), while failed messages are routed to the error handling path which performs reliable individual commits. This intermediary mechanism allows the system to achieve both high processing speed for successful messages and high reliability for error cases.
4Productivity
If batch processing is used to reduce disk forces, then processing efficiency is improved, but error handling complexity increases due to partial batch failures
Solution Approach 1:
The patent extracts error handling from the main batch processing flow by creating a separate slow path dedicated to error messages. When a message fails in a batch, it is extracted from the batch and routed to the error handling path for individual processing. This extraction simplifies error handling complexity by isolating error cases from the main fast path, allowing each to be optimized independently.
Data Source
AI summary
A batched unit of work is associated with a plurality of messages for use with a data store. A backout count, associated with a number of instances that work in association with the batched unit of work, is backed out. A backout threshold is associated with the backout count. A commit count is associated with committing the batched unit of work in response to successful commits for a predefined number of the plurality of messages. A checker checks whether the backout count is greater than zero and less than the backout threshold. An override component, responsive to the backout count being greater than zero and less than the backout threshold, overrides the commit count and commits the batched unit of work for a subset of the plurality of messages.


