Soft Deletion Shard for Sharded Database Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Sharded databases face performance issues due to time-consuming processes when adding or deleting data, as rebuilding indexes is required, and past soft deletion methods negatively impact performance by requiring additional operations on the primary shard and indexes.

Innovation Solution

Introducing a soft deletion shard (SDS) that stores soft-deletion documents referencing soft-deleted primary data, allowing for deletion and restoration without modifying the primary shard or its indexes, thus eliminating the need for write, delete, or index update operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional deletion methods are used in sharded databases, then data can be removed from the database, but index rebuilding and write operations cause performance degradation

Engineering Contradiction:
Improvedata deletion functionalityVSAvoiddatabase performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The database is divided into primary shards for data storage and a separate soft-deletion shard for tracking deleted documents. This segmentation allows deletion operations to occur in the soft-deletion shard without affecting the primary shards or their indexes, thus maintaining performance while enabling deletion functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A soft-deletion document acts as an intermediary between the deletion request and the actual data. Instead of directly deleting data from primary shards, the system inserts soft-deletion documents into the soft-deletion shard that reference the deleted documents, thereby mediating the deletion process without impacting primary shard performance.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If soft deletion is implemented on primary shards, then data can be restored, but additional write and index update operations are required

Engineering Contradiction:
Improvedata restoration capabilityVSAvoidoperation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

Restoration operations are segregated to the soft-deletion shard by removing soft-deletion documents, rather than performing write operations on primary shards. This segmentation eliminates the time-consuming index update operations that would otherwise be required on the primary shards.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The soft-deletion shard maintains a copy of deletion information (soft-deletion documents) that reference primary data. Restoration is achieved by manipulating these copies in the soft-deletion shard rather than directly modifying primary shards, thereby avoiding costly write and index operations on the primary data.

Inventive Principle:
Principle #26Copying

3Reliability

If indexes are updated during deletion operations, then data integrity is maintained, but the process becomes time-consuming

Engineering Contradiction:
Improvedata integrityVSAvoidoperation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

Index management is segmented from data deletion. The soft-deletion shard maintains its own indexing structure independent of the primary shards. Deletion operations only affect the soft-deletion shard's index, not the primary shards' indexes, thereby maintaining data integrity while simplifying the operational complexity.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11829394B2Soft deletion of data in sharded databases
Publication Date: 2023.11.28 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US11829394B2 patent drawing
  • US11829394B2 patent drawing
  • US11829394B2 patent drawing

AI summary

An embodiment includes receiving a request to delete a specified document from a primary shard of a sharded database. The embodiment also includes inserting a soft-deletion document to a soft-deletion shard, wherein the soft-deletion document identifies the specified document, which remains in the primary shard. The embodiment also includes receiving a query from a client application, wherein the specified document satisfies the query. The embodiment also includes blocking the specified document from being returned in response to the query while the soft-deletion document associated with the specified document remains in the soft-deletion shard.