apache / apache/pinot

Reduce ingestion latency during segment sealing

Open
#6,121 21 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

We have some use cases that demand very fresh data. For example, display events aggregates of the **last minute** for decision making.

However, as shown in the diagram below, the ingestion latency spikes during segment sealing, which breaches the SLA
![image](https://user-images.githubusercontent.com/13425258/95490792-92812100-094d-11eb-8c4c-d662ce3c7d11.png)

The segment size is 5MB, so in this particular case, it seals every a couple of hours. We could try smaller segment sizes, but that may result in different issues like too many zookeeper nodes.

The solution to this could be more optimistic on new segment creation: the new segments start ingestion without waiting for the sealing. However, this can complicate the state machine, as the segment cleanup is more complicated when the segment commit fails.

Any other thoughts to mitigate this issue?

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the segment-sealing and ingestion state machine, focusing on the latency spike described in the diagram and the proposed optimistic new-segment path. Compare possible mitigations, including smaller segments, and define cleanup behavior when segment commit fails; the issue does not specify an agreed implementation or completion test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.