Schema Evolution for Key Columnar Data into Row Sequences

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Cloud-based database systems face challenges in ensuring concurrent transaction processing while maintaining data integrity and consistency, particularly in distributed environments, where deadlock detection and resolution, as well as schema evolution, are complex and resource-intensive.

Innovation Solution

The implementation of a concurrency control mechanism combining multi-version concurrency control (MVCC) and locking for write operations, along with a two-level transaction hierarchy and distributed deadlock detection, enables safe and performant transaction processing. Additionally, schema evolution is facilitated through transparent and efficient management of multiple database schema versions, reducing resource utilization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If distributed deadlock detection and resolution mechanisms are implemented, then transaction processing safety and accuracy are improved, but system complexity and resource consumption increase

Engineering Contradiction:
Improvetransaction processing safetyVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system divides the distributed database into multiple independent clusters, each with its own transaction processing and deadlock detection mechanisms. This segmentation allows local deadlock detection within clusters without requiring global system-wide coordination, reducing overall system complexity while maintaining transaction safety through isolated cluster management.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A coordinator node is introduced as an intermediary to manage schema evolution and coordinate between clusters. The coordinator handles schema versioning and propagation without requiring direct communication between all cluster nodes, simplifying the distributed system architecture while ensuring consistent transaction processing across clusters.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If multiple schema versions are maintained for transparent evolution, then schema change flexibility is improved, but storage overhead and processing complexity increase

Engineering Contradiction:
Improveschema change flexibilityVSAvoidstorage overhead
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The system dynamically manages schema versions by maintaining multiple versions in memory during active transactions and automatically garbage collecting unused versions. This dynamic approach allows flexible schema evolution while controlling storage overhead through automated version lifecycle management rather than statically preserving all historical schemas.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

Unused schema versions are automatically discarded through garbage collection mechanisms that identify and remove schema versions no longer referenced by active transactions. This principle reduces storage overhead by eliminating obsolete schema data while maintaining necessary version history for ongoing transaction processing and recovery operations.

Inventive Principle:
Principle #34Discarding and recovering

3Reliability

If concurrency control mechanisms are implemented, then data consistency is improved, but transaction processing speed decreases

Engineering Contradiction:
Improvedata consistencyVSAvoidtransaction processing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system segments the database into independent clusters that can process transactions concurrently without requiring global locking. Each cluster maintains its own consistency through local concurrency control mechanisms, allowing multiple clusters to operate in parallel and improving overall throughput while ensuring data consistency within each cluster boundary.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Transactions perform self-validation through version checking and conflict detection mechanisms rather than requiring centralized arbitration for every operation. The system enables optimistic concurrency control where transactions proceed without locking and only resolve conflicts upon commit, improving processing speed while maintaining consistency through automated conflict resolution.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12135697B2Schema evolution for key columnar data into row-organized sequences
Publication Date: 2024.11.05 SNOWFLAKE INC
  • US12135697B2 patent drawing
  • US12135697B2 patent drawing
  • US12135697B2 patent drawing

AI summary

The subject technology generates, by a compute service manager, a schema hash value for a new schema version associated with a new schema version value, the schema hash value based on determining a sum of hash values of a set of attributes of value columns, the set of attributes comprises a column identifier, and a logical type of a column. The subject technology stores a mapping of the schema hash value to the new schema version value for a table in a metadata database. The subject technology stores a new schema entry based on the schema hash value, the new schema version value, and a new column for the table in the metadata database, the metadata database storing multiple entries for different schema versions, each entry including a particular schema hash value for mapping to a corresponding schema version from the different schema versions.