Asynchronous Garbage Collection in Parallel Transaction Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In parallel transaction systems, memory cannot be immediately freed after a delete operation due to ongoing transactions, as the memory manager is unaware of all parallel transactions, leading to delayed garbage collection.

Innovation Solution

Implementing asynchronous garbage collection by inserting a clean-up entry in the secondary transaction manager, attaching it to a subsequent transaction, and comparing its assigned time to the most-recently-reported minimum read timestamp, ensuring garbage collection is triggered only when no parallel transactions need the memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If memory is immediately freed after a delete operation, then memory utilization is improved, but data consistency is compromised because parallel transactions may still need to reference the deleted data

Engineering Contradiction:
Improvememory availabilityVSAvoiddata consistency
Core Design Contradiction:
Quantity of substanceVSReliability

Solution Approach 1:

The patent applies preliminary action by inserting a clean-up entry into the secondary transaction manager immediately when a delete operation occurs, but delaying the actual memory freeing until it is safe to do so. This allows the system to prepare for memory reclamation in advance while ensuring data consistency by waiting for all parallel transactions to complete before executing the clean-up entry.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the memory manager is made aware of all parallel transactions, then data consistency is improved, but system complexity increases due to the need for extensive coordination and locking mechanisms

Engineering Contradiction:
Improvedata consistencyVSAvoidtransaction coordination complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces an intermediary approach by using a clean-up entry mechanism that bridges the delete operation and actual memory freeing. Instead of requiring the memory manager to directly coordinate with all parallel transactions, the clean-up entry acts as a mediator that is automatically executed when safe, reducing the complexity of transaction coordination while maintaining data consistency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent extracts the memory freeing operation from the immediate delete transaction flow and separates it into a deferred clean-up entry. This extraction allows the delete operation to complete quickly without blocking for memory reclamation, while the actual memory freeing is handled separately when it is safe to do so, reducing coordination complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

3Reliability

If garbage collection is delayed until all parallel transactions complete, then data consistency is improved, but memory utilization deteriorates due to prolonged memory occupation

Engineering Contradiction:
Improvedata consistencyVSAvoidmemory utilization
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent applies preliminary action by inserting the clean-up entry immediately when the delete operation occurs, preparing for future memory reclamation. This ensures that as soon as it becomes safe to free memory (when all parallel transactions complete), the clean-up entry can be executed promptly, minimizing the duration of memory occupation while maintaining data consistency.

Inventive Principle:
Principle #10Preliminary action

4Reliability

If locking mechanisms are implemented to prevent premature memory freeing, then data consistency is improved, but system performance deteriorates due to reduced parallelism

Engineering Contradiction:
Improvedata consistencyVSAvoidparallel transaction throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent extracts the memory freeing operation from the critical path of parallel transactions. By using a deferred clean-up entry mechanism, the delete operation can complete immediately without acquiring locks that would block other parallel transactions. The memory freeing is performed later when safe, allowing maximum parallelism during transaction execution while ensuring data consistency.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The clean-up entry serves as an intermediary that eliminates the need for locking mechanisms. Instead of using locks to prevent premature memory freeing, the system uses the clean-up entry mechanism with timestamp comparison to safely defer memory reclamation, thereby maintaining parallel transaction throughput while ensuring data consistency.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS11481321B2Asynchronous garbage collection in parallel transaction system without locking
Publication Date: 2022.10.25 SAP SE
  • US11481321B2 patent drawing
  • US11481321B2 patent drawing
  • US11481321B2 patent drawing

AI summary

Methods, systems, and computer-readable storage media for determining that a transaction of a plurality of transactions performed in at least a portion of a system includes a delete operation, the plurality of transactions being managed by a secondary transaction manager and including a subset of all transactions performed in the system, in response to the delete operation, inserting a clean-up entry in the secondary transaction manager, attaching the clean-up entry to a subsequent transaction in order to determine and assign a time to the cleanup-entry that is used to subsequently trigger garbage collection, and selectively comparing the time to a most-recently-reported minimum read timestamp that is periodically reported to the secondary transaction manager from a primary transaction manager of the system, wherein the clean-up entry is executed in response to determining that the time is less than the most-recently-reported minimum read timestamp.