From ce1d1ee479ddacdd0834cade329cbbf70a2af4c6 Mon Sep 17 00:00:00 2001 From: Surekha Date: Tue, 19 Feb 2019 10:52:37 -0800 Subject: [PATCH] add note on consistency of results for sys.segments queries (#7034) * add doc * change docs * PR comments * few more changes --- docs/content/querying/sql.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/content/querying/sql.md b/docs/content/querying/sql.md index 3f274918569d..883904ced99e 100644 --- a/docs/content/querying/sql.md +++ b/docs/content/querying/sql.md @@ -571,6 +571,8 @@ The "sys" schema provides visibility into Druid segments, servers and tasks. ### SEGMENTS table Segments table provides details on all Druid segments, whether they are published yet or not. +#### CAVEAT +Note that a segment can be served by more than one stream ingestion tasks or Historical processes, in that case it would have multiple replicas. These replicas are weakly consistent with each other when served by multiple ingestion tasks, until a segment is eventually served by a Historical, at that point the segment is immutable. Broker prefers to query a segment from Historical over an ingestion task. But if a segment has multiple realtime replicas, for eg. kafka index tasks, and one task is slower than other, then the sys.segments query results can vary for the duration of the tasks because only one of the ingestion tasks is queried by the Broker and it is not gauranteed that the same task gets picked everytime. The `num_rows` column of segments table can have inconsistent values during this period. There is an open [issue](https://github.com/apache/incubator-druid/issues/5915) about this inconsistency with stream ingestion tasks. |Column|Notes| |------|-----|