Skip to content

druid: fix historical Guice startup failure and load's COUNT(*) parsing - #2444

Open
KazukiKandaKK wants to merge 1 commit into
ClickHouse:mainfrom
KazukiKandaKK:druid-memory-harness-fix-review
Open

KazukiKandaKK wants to merge 1 commit into
ClickHouse:mainfrom
KazukiKandaKK:druid-memory-harness-fix-review

Conversation

@KazukiKandaKK

Copy link
Copy Markdown
Contributor

druid/ currently fails to start on single-server-medium, and load's completion check never detects success.

1. install doubles historical druid.processing.buffer.sizeBytes from 500MiB to 1000MiB but leaves -XX:MaxDirectMemorySize at the stock 13g. Druid requires (numThreads + numMergeBuffers + 1) * buffer.sizeBytes; for this profile (numThreads=15, numMergeBuffers=4) that is 20 × 1000MiB ≈ 19.53 GiB, which exceeds 13g and fails Guice provisioning. Raised MaxDirectMemorySize to 21g.

2. Druid returns [{"EXPR$0":<count>}]. The check used grep -oE '[0-9]+' | head -n1, which matches the 0 in EXPR$0, so cnt is always 0 and the loop polls for 6h then exits with "hits datasource still not queryable". load now parses the response as JSON.

The run completed all 43 queries on a fresh c6a.4xlarge with the real 100M-row dataset. 12/43 still returned [null,null,null]: 8 are a pre-existing SQL-dialect limitation independent of this PR; 4 fail only at 100M rows. Out of scope here.

1. The historical process fails to start: install doubles
druid.processing.buffer.sizeBytes (500MiB -> 1000MiB) on
single-server-medium but leaves historical's
-XX:MaxDirectMemorySize at the stock 13g in single-server-medium's
jvm.config. Per Druid's own direct memory formula,
(numThreads + numMergeBuffers + 1) * buffer.sizeBytes, that's
20 * 1000MiB = 20,971,520,000 bytes (~19.53 GiB), which exceeds the
13g cap and throws a Guice ProvisionException before historical can
start. This is independent of dataset size. 20g (21,474,836,480
bytes) already clears that; this raises MaxDirectMemorySize to 21g
for a small margin.

2. load's COUNT(*) check parses the SQL response
[{"EXPR$0":<count>}] with `grep -oE '[0-9]+' | head -n1`, which matches
the 0 in the key name "EXPR$0" instead of the actual count. This makes
the check always see 0 and poll for its full 6h budget even when the
table is already queryable, failing with "hits datasource still not
queryable" afterward. load now parses the response as JSON.

Verified end-to-end on a fresh c6a.4xlarge: with both fixes applied,
the official benchmark.sh no longer aborts and runs through all 43
queries with the real 100M-row dataset. 12 of those return null
(8 pre-existing SQL-dialect limits; 4 fail only at 100M rows, not
addressed here); see follow-up.
@alexey-milovidov alexey-milovidov added the machine:all PR benchmark on every machine type label Oct 12, 2026
@alexey-milovidov alexey-milovidov self-assigned this Oct 12, 2026
@alexey-milovidov
alexey-milovidov deployed to benchmark-approval October 12, 2026 02:08 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

The run of druid on c6a.metal did not produce results.
The run of druid on c7a.metal-48xl did not produce results.
The run of druid on c8g.4xlarge did not produce results.
The run of druid on c8g.metal-48xl did not produce results.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

The run of druid on c6a.4xlarge did not produce results.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

The run of druid on c6a.xlarge did not produce results.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

The run of druid on c6a.large did not produce results.

Logs:

@github-actions

Copy link
Copy Markdown
Contributor

The run of druid on c6a.2xlarge did not produce results.
The run of druid on t3a.small did not produce results.

Logs:

@alexey-milovidov

Copy link
Copy Markdown
Member

@KazukiKandaKK, it didn't work.

This branch was successfully deployed

1 active deployment
benchmark-approval — 6fc0085e Deployed Oct 12, 2026 by alexey-milovidov via launch #743
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

machine:all PR benchmark on every machine type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants