apache / apache/druid

Ability to configure Druid to fail a query that tries to reach an unavailable segment

Open
#12,829 5 comments 0 reactions 0 assignees View on GitHub
Evergreen Feature/Change Description
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

### Description

A configuration option (e.g. `druid.sql.planner.failOnMissingSegments`) that when set to true, Druid looks at the segment metadata for the __time specified in the query and fails if there's an unavailable realtime segment for that datasource.

### Motivation

I recognize this isn't a perfect system but realtime ingestion is typically ingesting data related to the current time, so if that fails (e.g. a realtime segment gets dropped due to failure during handover) then the data that was once being returned by queries appears to disappear. Our users see this as **inconsistent/unreliable data and trust in Druid falls**. Our user would prefer an error here, something akin to "Data is missing for __time specified"

For additional motivation, if ingestion is failing then reduced load on the failing nodes might help. If queries fail before ever hitting ingestion nodes this can help reduce load on the failing nodes.

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named in the issue. Start by tracing Druid's SQL planner query path and segment metadata handling; define the behavior for unavailable realtime segments and verify that the configuration causes queries for the specified __time and datasource to fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.