Delta Table Optimize Batching for Driver Memory Overflow

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The existing cluster-based data processing systems face memory overflow issues when consolidating a large number of small data files, leading to driver node crashes and processing failures due to excessive metadata load.

Innovation Solution

Implementing a delta table optimize command that iteratively assigns metadata files to bins, monitors bin and batch thresholds, and employs a driver level overallocation lock to prevent memory overload, ensuring efficient file consolidation without crashes.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the optimize command reads metadata for all files onto the driver node to enable consolidation, then file consolidation efficiency is improved, but the driver node memory capacity is overwhelmed causing crashes

Engineering Contradiction:
Improvefile consolidation efficiencyVSAvoiddriver node stability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent segments the metadata loading process by introducing a threshold that limits the number of files loaded onto the driver node at once. Instead of loading all file metadata simultaneously, the system loads metadata in controlled batches, dividing the large task into smaller manageable segments that prevent memory overflow while maintaining consolidation efficiency

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements preliminary actions by pre-establishing bin thresholds and batch limits before the consolidation process begins. The driver node pre-configures memory management parameters and bin assignment rules, allowing files to be consolidated in a controlled manner without overwhelming memory capacity during execution

Inventive Principle:
Principle #10Preliminary action

2Manufacturing precision

If the driver node loads all metadata to assign files into bins for consolidation, then consolidation completeness is improved, but memory overflow occurs causing processing failure

Engineering Contradiction:
Improveconsolidation completenessVSAvoidmetadata volume
Core Design Contradiction:
Manufacturing precisionVSQuantity of substance

Solution Approach 1:

The patent segments the metadata processing into multiple batches with controlled sizes. Each batch contains a limited number of files that can be processed simultaneously, ensuring that the driver node never holds more metadata than its memory capacity allows while still achieving complete consolidation through iterative processing

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent dynamically adjusts processing parameters including bin thresholds, batch sizes, and memory limits based on the actual data volume and system capacity. This allows the system to adapt the metadata loading and processing parameters to match available memory resources, preventing overflow while maintaining consolidation completeness

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12566731B1Scaling delta table optimize command
Publication Date: 2026.03.03 DATABRICKS INC
  • US12566731B1 patent drawing
  • US12566731B1 patent drawing
  • US12566731B1 patent drawing

AI summary

The interface is to receive an indication to execute an optimize command. The processor is to receive a file name; determine whether adding a file of the file name to a current bin causes the current bin to exceed a threshold; associate the file with the current bin in response to determining that adding the file does not cause the current bin to exceed the bin threshold; in response to determining that adding the file to the current bin causes the current bin to exceed the bin threshold: associate the file with a next bin, indicate that the current bin is closed, and add the current bin to a batch of bins; determine whether a measure of the batch of bins exceeds a batch threshold; and in response to determining that the measure exceeds the batch threshold, provide the batch of bins for processing.