Slackbot
01/06/2023, 5:46 PMSergio Ferragut
01/06/2023, 6:20 PMreplicationThrottleLimit in the coordinator's dynamic configuration.Konstantin Minevskiy
01/06/2023, 6:32 PMVijay Narayanan
01/07/2023, 12:45 AMKonstantin Minevskiy
01/07/2023, 1:09 AM2023-01-06T22:02:38,785 INFO [task-runner-0-priority-0] org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexSupervisorTask - Published [929] segments
2023-01-06T22:02:38,787 INFO [task-runner-0-priority-0] org.apache.druid.indexing.worker.executor.ExecutorLifecycle - Task completed with status: {
"id" : "index_parallel_media_events.v1.media_embed_location.monthly.v1_mndemcao_2023-01-06T21:17:46.766Z",
"status" : "SUCCESS",
"duration" : 2687646,
"errorMsg" : null,
"location" : {
"host" : null,
"port" : -1,
"tlsPort" : -1
}
}Vijay Narayanan
01/07/2023, 1:21 AMKonstantin Minevskiy
01/07/2023, 1:30 AMKonstantin Minevskiy
01/07/2023, 1:31 AMSegments tab.Konstantin Minevskiy
01/07/2023, 1:31 AMQuery returned no data.Konstantin Minevskiy
01/07/2023, 1:37 AM20,880 results in 1.62s for
{
"queryType": "segmentMetadata",
"dataSource": "events.my_event_datasource",
"intervals": [
"2022-10-01/2022-11-01"
]
}
(that’s the time range in question)Vijay Narayanan
01/07/2023, 3:07 AMKonstantin Minevskiy
01/07/2023, 3:24 AMAmatya Avadhanula
01/07/2023, 3:40 AMselect num_replicas, count(*) from sys.segments where datasource=<datasource> and "start"=<intervalStart> and "end"=<intervalEnd> group by 1 in the druid console? It's possible a few (core) segments are still unavailableVijay Narayanan
01/07/2023, 3:40 AMVijay Narayanan
01/07/2023, 3:41 AMVijay Narayanan
01/07/2023, 3:41 AMKonstantin Minevskiy
01/09/2023, 3:16 AMselect sum(metric1), sum(metric2) from "datasource" where __time >= <daterange_start> and __time < <daterage_end>
I know it contains non-empty results since we have the same data in a different datasource (with different segment and query granularity) After re-running the same batch ingestion spec several times, the query above returns data that matches what we have in the original datasource. So yeah, the ultimate question here is why would re-running the same task several times produce different results.Konstantin Minevskiy
01/09/2023, 6:14 PM0.21.0 release.Konstantin Minevskiy
01/09/2023, 6:18 PMSergio Ferragut
01/09/2023, 7:14 PMKonstantin Minevskiy
01/09/2023, 7:18 PMloadForever). So I imagine that’s not the problem.Konstantin Minevskiy
01/09/2023, 7:19 PMSegments tab would reflect that?Sergio Ferragut
01/09/2023, 7:26 PMKonstantin Minevskiy
01/09/2023, 7:30 PMKonstantin Minevskiy
01/09/2023, 7:33 PMKonstantin Minevskiy
01/09/2023, 7:34 PM0.21.0 ) right now.Konstantin Minevskiy
01/09/2023, 7:47 PMSegments tab.Sergio Ferragut
01/09/2023, 7:50 PMKonstantin Minevskiy
01/09/2023, 7:57 PMKonstantin Minevskiy
01/09/2023, 8:01 PMrandom and, thus, queries should be routed to random historical nodes. So if the data is loaded (and it looks like it is - with replication factor of 2), at least one of those historicals should respond with some data. I wonder if I should try querying historicals directly to see if the problem is at the “upper” layer.Sergio Ferragut
01/09/2023, 9:04 PMKonstantin Minevskiy
01/09/2023, 9:05 PMKonstantin Minevskiy
01/09/2023, 9:06 PMPOST /druid/v2/candidates/ with the query in question and got back a bunch of segments back with IP addresses of historicals.Konstantin Minevskiy
01/09/2023, 9:07 PMKonstantin Minevskiy
01/09/2023, 10:50 PM{
"queryType": "timeseries",
"dataSource": {
"type": "table",
"name": "my_datasource"
},
"intervals": {
"type": "intervals",
"intervals": [
"2022-06-01T05:00:00.000Z/2023-01-01T05:00:00.000Z"
]
},
"descending": false,
"virtualColumns": [],
"filter": {
"type": "selector",
"dimension": "dim1",
"value": null,
"extractionFn": null
},
"granularity": {
"type": "all"
},
"aggregations": [
{
"type": "longSum",
"name": "a0",
"fieldName": "f1",
"expression": null
},
{
"type": "longSum",
"name": "a1",
"fieldName": "f2",
"expression": null
},
{
"type": "longSum",
"name": "a2",
"fieldName": "f3",
"expression": null
}
],
"postAggregations": [],
"limit": 2147483647
}
Not sure if I’m doing it correctly though - I POST against <historical_host_ip>:8083/druid/v2?pretty . I do get values back for the original datasource (from which I ingest data) using this method, like so:
[ {
"timestamp" : "2022-12-14T05:00:00.000Z",
"result" : {
"a1" : 313735,
"a2" : 100597,
"a0" : 64
}
} ]⏎
For this new datasource every historical returns:
[ {
"timestamp" : "2022-06-01T05:00:00.000Z",
"result" : {
"a1" : 0,
"a2" : 0,
"a0" : 0
}
} ]
However, I get back the data for every month for this problematic datasource except 1 when I query using Druid Query UI, so these empty API responses look odd (assuming I’m doing it correctly).Sergio Ferragut
01/09/2023, 11:30 PMKonstantin Minevskiy
01/10/2023, 1:15 AM{
"type": "index_parallel",
"spec": {
"dataSchema": {
"dataSource": "new_datasource",
"timestampSpec": {
"column": "__time",
"format": "millis"
},
"dimensionsSpec": {
"dimensions": [
...a_bunch_of_dimensions_here
]
},
"metricsSpec": [
...a_bunch_of_metrics_here
],
"granularitySpec": {
"type": "uniform",
"segmentGranularity": {
"type": "period",
"period": "P1M",
"timeZone": "EST"
},
"queryGranularity": {
"type": "period",
"period": "P1M",
"timeZone": "EST"
},
"rollup": true,
"intervals": ["2022-10-01T05:00:00.000Z/2022-11-01T05:00:00.000Z"]
}
},
"ioConfig": {
"type": "index_parallel",
"inputSource": {
"type": "druid",
"dataSource": "origin_datasource",
"interval": "2022-10-01T05:00:00.000Z/2022-11-01T05:00:00.000Z"
},
"appendToExisting": false
},
"tuningConfig": {
"type": "index_parallel",
"maxNumConcurrentSubTasks": 60,
"forceGuaranteedRollup": false,
"splitHintSpec": {
"type": "maxSize",
"maxNumFiles": 200
},
"partitionsSpec": {
"type": "dynamic",
"maxRowsPerSegment": 5000000,
"targetRowsPerSegment": 5000000
}
}
}
}Vijay Narayanan
01/10/2023, 1:27 AMSergio Ferragut
01/10/2023, 1:34 AMSergio Ferragut
01/10/2023, 1:36 AMSergio Ferragut
01/10/2023, 2:07 AMKonstantin Minevskiy
01/10/2023, 3:23 PMhmm….the new data source is derived by rolling up the old data source? Did the old data source have metrics?“Yes” to both questions 🙂
Then I realized, the time zone is the reason for the time shift.Yep.
Konstantin Minevskiy
01/10/2023, 3:25 PMVijay Narayanan
01/10/2023, 3:33 PMKonstantin Minevskiy
01/10/2023, 3:46 PMKonstantin Minevskiy
01/10/2023, 3:48 PMSergio Ferragut
01/10/2023, 4:09 PMcount(*) from source vs sum("count") from rollup for that period?Konstantin Minevskiy
01/10/2023, 4:24 PMKonstantin Minevskiy
01/10/2023, 4:24 PMKonstantin Minevskiy
01/10/2023, 4:25 PMSergio Ferragut
01/10/2023, 5:09 PMKonstantin Minevskiy
01/10/2023, 5:10 PMSergio Ferragut
01/10/2023, 5:15 PMSergio Ferragut
01/10/2023, 5:16 PMKonstantin Minevskiy
01/10/2023, 5:30 PM{"__time":1664600400000,"metric1":19.905000686645508,"metric2":null,"metric3":0,"metric4":0,"domain":"<http://domain.com|domain.com>","count":1,"opportunities":0,"user_id":xxxx,"video_id":0,"loads":1,"media_type":"video"}
(I truncated / edited the output, but I can see correct values in the original dump).Sergio Ferragut
01/10/2023, 5:38 PMKonstantin Minevskiy
01/10/2023, 5:40 PMSergio Ferragut
01/10/2023, 5:40 PMKonstantin Minevskiy
01/10/2023, 5:40 PMKonstantin Minevskiy
01/10/2023, 6:39 PMSergio Ferragut
01/10/2023, 6:44 PMSELECT count(*) FROM rollup WHERE <time condition for that interval> return a count?Konstantin Minevskiy
01/10/2023, 6:45 PMKonstantin Minevskiy
01/10/2023, 6:47 PMKonstantin Minevskiy
01/10/2023, 6:47 PMSergio Ferragut
01/10/2023, 6:50 PMKonstantin Minevskiy
01/10/2023, 6:52 PM__time >= '2022-10-01T05:00:00.000Z' and __time < '2022-11-01T05:00:00.000Z'Konstantin Minevskiy
01/10/2023, 6:53 PMSergio Ferragut
01/10/2023, 6:54 PMKonstantin Minevskiy
01/10/2023, 6:54 PMSergio Ferragut
01/10/2023, 7:48 PM--dump bitmaps --decompress-bitmaps could shed some light.Konstantin Minevskiy
01/10/2023, 7:54 PMKonstantin Minevskiy
01/10/2023, 7:56 PMSergio Ferragut
01/10/2023, 7:59 PMsqlTimeZone in the query context in any of these tests?Konstantin Minevskiy
01/10/2023, 8:02 PMVijay Narayanan
01/11/2023, 4:20 AMKonstantin Minevskiy
01/11/2023, 2:45 PMKonstantin Minevskiy
01/12/2023, 3:37 PMVijay Narayanan
01/12/2023, 11:47 PMVijay Narayanan
01/13/2023, 3:51 AMKonstantin Minevskiy
01/13/2023, 2:26 PMVijay Narayanan
01/16/2023, 4:03 AM2023-01-16T04:01:33,366 ERROR [task-runner-0-priority-0] org.apache.druid.indexing.common.task.IndexTask - Encountered exception in BUILD_SEGMENTS.
org.apache.druid.java.util.common.ISE: Failed to get shardSpec for interval[2019-08-19T05:00:00.000Z/2019-08-26T05:00:00.000Z]
at org.apache.druid.indexing.common.task.ShardSpecs.getShardSpec(ShardSpecs.java:57) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.NonLinearlyPartitionedSequenceNameFunction.getSequenceName(NonLinearlyPartitionedSequenceNameFunction.java:49) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.InputSourceProcessor.process(InputSourceProcessor.java:107) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.IndexTask.generateAndPublishSegments(IndexTask.java:922) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.IndexTask.runTask(IndexTask.java:526) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.AbstractTask.run(AbstractTask.java:169) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexSupervisorTask.runSequential(ParallelIndexSupervisorTask.java:1199) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexSupervisorTask.runTask(ParallelIndexSupervisorTask.java:532) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.common.task.AbstractTask.run(AbstractTask.java:169) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.overlord.SingleTaskBackgroundRunner$SingleTaskBackgroundRunnerCallable.call(SingleTaskBackgroundRunner.java:477) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at org.apache.druid.indexing.overlord.SingleTaskBackgroundRunner$SingleTaskBackgroundRunnerCallable.call(SingleTaskBackgroundRunner.java:449) ~[druid-indexing-service-2022.11.0-iap.jar:2022.11.0-iap]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_261]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_261]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_261]
at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_261]Vijay Narayanan
01/16/2023, 4:03 AMVijay Narayanan
01/16/2023, 6:20 AM"granularitySpec": {
"type": "uniform",
"segmentGranularity": "WEEK",
"queryGranularity": {
"type": "period",
"period": "P1W",
"timeZone": "America/New_York",
"origin": null
},
"rollup": true,
"intervals": []
}
can you try making the segment granularity just “MONTH” and the query granularity as you have now? My thinking is if the above works for you then it would be ok as segment granularity does not affect the resultKonstantin Minevskiy
01/17/2023, 3:03 PMKonstantin Minevskiy
02/15/2023, 7:41 PM0.21.0 cluster to the latest (25.0.0) version and we’re experiencing an issue where our historical processes get restarted when trying to process long-running queries. We haven’t changed anything in our Druid config.
Observations:
1. Historical pods exit with status code of either 137 (sigkill) or 143 (sigterm)
2. Datadog metrics for these pods don’t show any apparent OOM events (not very different from what we observed before the migration)
3. Pods get restarted randomly - sometimes it’s just 1 or 2 and sometimes all of them at the same time.Vijay Narayanan
02/16/2023, 5:35 PMSergio Ferragut
02/17/2023, 12:31 AMKonstantin Minevskiy
02/17/2023, 2:36 PM