Shard-Aware Index Message Routing to Reduce Commit Blocking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional index pipelines distribute index messages randomly among message queues, leading to blocking and reduced throughput due to shards being in a commit phase or operating at varying speeds.

Innovation Solution

Implement a shard-aware data partitioning method using a common mapping scheme that assigns index messages to specific shards based on hash ranges, ensuring efficient distribution and reducing delays.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If index messages are distributed randomly among message queues, then the distribution is simple to implement, but blocking and reduced throughput occur during shard updates

Engineering Contradiction:
ImprovethroughputVSAvoiddistribution complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the index message distribution by creating dedicated message queues for each shard instead of a single shared queue. Each queue is assigned to specific shards based on a mapping relationship, allowing parallel processing without blocking. This segmentation resolves the contradiction by maintaining simple queue management while eliminating throughput bottlenecks caused by random distribution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by assigning different message queues to different shards based on their specific characteristics and current state. The mapping between queues and shards creates localized relationships where each queue is optimized for its target shard, improving overall system throughput while maintaining manageable complexity through structured local assignments.

Inventive Principle:
Principle #3Local quality

2Speed

If multiple updaters send index messages to all shards in parallel, then update speed increases, but blocking occurs when shards are in commit phase

Engineering Contradiction:
Improveupdate speedVSAvoidupdate reliability
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent segments the updater workload by assigning each updater to specific message queues and their corresponding target shards. Instead of having updaters send messages to all shards, each updater is responsible for a subset of queues and shards, enabling parallel processing without blocking. This maintains high update speed while ensuring reliability by avoiding conflicts during shard commit phases.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces message queues as intermediary components between updaters and shards. These queues act as buffers that decouple the updater from the shard, allowing updaters to send messages asynchronously without being blocked by shard commit phases. This intermediary mechanism preserves both update speed and reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Productivity

If shards operate at varying speeds, then system flexibility is maintained, but overall throughput is adversely impacted by slower shards

Engineering Contradiction:
Improveoverall throughputVSAvoidshard speed variation
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the shard processing workload by creating dedicated message queues for each shard, allowing faster shards to process their queues more quickly while slower shards process at their own pace. This segmentation eliminates the bottleneck effect where slower shards hold up the entire system, improving overall throughput while maintaining adaptability to individual shard performance characteristics.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent ensures continuous useful action by having multiple updaters work on different message queues simultaneously. While one shard may be slower, other updaters continue processing messages for faster shards without interruption. This continuous parallel processing maintains high overall throughput despite variations in individual shard speeds.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS12373491B2System and method for distributing index messages in a shard-aware index pipeline
Publication Date: 2025.07.29 WALMART APOLLO LLC
  • US12373491B2 patent drawing
  • US12373491B2 patent drawing
  • US12373491B2 patent drawing

AI summary

A method can include determining a common mapping scheme for message queues and shards for an index message to be committed to the shards. The common mapping scheme can include a respective shard hash range for each shard, and a mapping function between the message queues and the shards. The method further can include determining a message hash value for the index message. Additionally, the method can include determining a target shard based on the message hash value and the respective shard hash range for each shard. The method also can include determining an intermediate message queue based on the message hash value and the mapping function. Moreover, the method can include storing the index message to the intermediate message queue. The method further can include causing the index message stored in the intermediate message queue to be committed to the target shard. Other embodiments are disclosed.