Tenant Data Write Protection via Metadata Caching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Data migration in multi-tenant databases is inefficient due to data corruption risks from unauthorized writes during the copying process, leading to resource waste and downtime, as existing solutions require frequent checks for write protection across all tenants, degrading performance.

Innovation Solution

Implementing a write protection system using metadata caching with TTL and triggers to selectively allow writes only during data migration, ensuring that only the consumer process can modify data being copied, while preventing other applications from writing to protected tenants, thus minimizing performance impact.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If write protection checks are performed for all tenants during data migration, then data integrity is protected, but system performance degrades due to frequent checks

Engineering Contradiction:
Improvedata integrityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies write protection only to specific tenants undergoing data migration rather than all tenants. The system identifies tenants with ongoing migrations and applies selective write protection to those specific tenants, leaving other tenants unaffected. This localized approach maintains data integrity for migrating tenants while preserving system performance for non-migrating tenants.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent segments tenants into different groups: those undergoing data migration and those not. By dividing the tenant population and applying write protection only to the migration group, the system avoids the performance penalty of checking all tenants. The segmentation is implemented through tracking migration status and applying protection selectively based on this status.

Inventive Principle:
Principle #1Segmentation

2Productivity

If data copying process is allowed to continue without interruption, then productivity is maintained, but data corruption risk increases from concurrent writes

Engineering Contradiction:
Improvedata copying throughputVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary anti-action by establishing write protection barriers before data corruption can occur. When a write operation is detected on a tenant undergoing migration, the system proactively blocks the write and rolls back the transaction, preventing potential data corruption before it can affect the consistency of the migration process.

Inventive Principle:
Principle #9Preliminary anti-action

Solution Approach 2:

The system implements feedback mechanisms by continuously monitoring write operations on tenants during migration. When a write is detected, the system provides feedback by triggering a rollback and preventing the write from committing. This feedback loop ensures data consistency while allowing the migration process to continue with minimal interruption.

Inventive Principle:
Principle #23Feedback

3Reliability

If write protection is enforced for all operations, then data corruption is prevented, but resource efficiency decreases due to rollback operations

Engineering Contradiction:
Improvedata protectionVSAvoidcomputing resource waste
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent limits write protection and rollback operations to only those tenants currently undergoing data migration. By applying protection locally to specific tenants rather than globally to all tenants, the system minimizes the frequency of rollback operations and associated resource waste while maintaining adequate data protection for the migration process.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12141119B2Write protecting tenant data in a multi-tenant database system
Publication Date: 2024.11.12 SALESFORCE INC
  • US12141119B2 patent drawing
  • US12141119B2 patent drawing
  • US12141119B2 patent drawing

AI summary

A system performs write protection of data that being copied. The write protection protects the data from being corrupted by applications. The system allows writes that are part of the data transfer from the source database. The system uses triggers to implement write protection. The system stores a list of tenants that are write protected in a metadata table. The system implements a statement level trigger that caches the metadata table in memory. If the cache is determined to be older than the limit specified by the TTL, the system reloads the cache. The statement may perform multiple row level operations. A row level operation implements a row level trigger that checks the in-memory data structure to determine whether the tenant is write protected. If the tenant is determined to be write protected, the system rolls back the row level operation.