Concurrent Raft Log Execution via Conflict Verification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The Raft algorithm, commonly used in distributed storage systems for ensuring data consistency, faces limitations in high-concurrency scenarios due to its strict serialization design, leading to reduced throughput and potential system bottlenecks when logs arrive out of order, causing missing logs and blocking the committing process.

Innovation Solution

The concurrent Raft algorithm introduces a log out-of-order replication mechanism that allows logs to be copied and committed concurrently, using a log hole array (LHA) to verify conflicts and ensure data consistency, enabling logs to be executed out of order within a defined active window without waiting for previous logs to be executed.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If the conventional Raft algorithm is used to ensure data consistency in distributed storage systems, then data consistency is guaranteed, but system throughput is reduced due to strict serialization design

Engineering Contradiction:
Improvedata consistencyVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the log execution process into independent units that can be processed in parallel. By dividing the serialized log commit process into separate, concurrently executable segments with proper conflict detection, the system achieves both parallelism and consistency guarantees.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces dynamic conflict verification mechanisms that adaptively determine whether logs can be executed in parallel. The system dynamically adjusts the execution strategy based on conflict detection results, allowing flexible parallel execution when safe and maintaining serialization when conflicts exist.

Inventive Principle:
Principle #15Dynamics

2Reliability

If logs are executed in strict order to maintain consistency, then data reliability is ensured, but execution efficiency is reduced due to blocking

Engineering Contradiction:
Improvedata reliabilityVSAvoidexecution delay
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary conflict verification checks before log execution to identify potential conflicts in advance. By checking for conflicts beforehand and only blocking when necessary, the system avoids unnecessary execution delays while maintaining reliability.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent allows logs to skip the sequential waiting process when conflict verification confirms no conflicts exist. Non-conflicting logs can be executed immediately without waiting for previous logs, significantly reducing execution delay while maintaining data reliability.

Inventive Principle:
Principle #21Skipping (Rushing through)

3Reliability

If the system waits for previous logs to be executed before processing new logs, then consistency is maintained, but concurrency is reduced

Engineering Contradiction:
ImproveconsistencyVSAvoidconcurrency capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent introduces conflict verification mechanisms as intermediaries between log arrival and log execution. This intermediary layer checks for potential conflicts and determines whether parallel execution is safe, enabling the system to handle concurrent logs while maintaining consistency through selective verification.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Reliability

If strict serialization is implemented to prevent conflicts, then data integrity is ensured, but system performance deteriorates in high-concurrency scenarios

Engineering Contradiction:
Improvedata integrityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent changes the execution parameter from strict sequential order to conditional parallel execution. By modifying the log execution parameter based on conflict verification results, the system maintains data integrity while achieving high performance in concurrent scenarios through parameter-driven execution strategies.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12111817B2Log execution method and apparatus, computer device and storage medium
Publication Date: 2024.10.08 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12111817B2 patent drawing
  • US12111817B2 patent drawing
  • US12111817B2 patent drawing

AI summary

This application provides a log execution method and apparatus, a computer device and a storage medium and relates to the technical field of databases. The method includes circularly scanning a log execution active window, the log execution active window comprising a plurality of logs which are not executed, and all the logs before the log execution active window having been executed; acquiring a conflict verification result of a log in the log execution active window based on storage range information of the log, the storage range information indicating a storage range of the log and a storage range of a target number of logs before the log, and the target number being equal to a size of the log execution active window; and executing the log if the conflict verification result is no conflict.