• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Logflare / logflare / 33781150459-1
83%

Build:
DEFAULT BRANCH: main
Ran 03 Sep 2026 05:00PM UTC
Jobs 1
Files 459
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Sep 2026 04:36PM UTC coverage: 82.185% (-0.02%) from 82.207%
33781150459-1

push

github

chasers
fix: keep database work out of the SourceSup partition critical section

Two canary nodes wedged at boot, each holding ~52 GiB of process heap. ErlSysMon
named a SourcesSup partition with a long_message_queue on both, 14 seconds before
either node appeared in telemetry.

SourcesSup is a PartitionSupervisor of DynamicSupervisors, and sources hash to a
partition by id. `DynamicSupervisor.start_child/2` is a `GenServer.call` with an
infinite timeout, and `SourceSup.init/1` runs inside it. That init does five
cache-fronted lookups, each of which falls through to Postgres on a miss. A cold
node therefore makes several database round trips per source start, all
serialized through one partition, which blocks every other source hashing to it.

`SourceSup.prefetch/1` resolves exactly those five lookups, and
`start_source_sup/1` calls it before `start_child`. The latency moves to the
calling process, where it parallelizes across callers, so the partition's
critical section only ever reads warm Cachex entries.

`init/1` is unchanged, so a crash-restart still re-resolves and picks up
configuration changes.

Rejected alternative: passing a pre-resolved struct into the child spec and making
`init/1` pure. `restart: :transient` means DynamicSupervisor reuses the stored spec
on a crash-restart, so the supervisor would come back with a stale plan and backend
list indefinitely.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015XJWSbFFxwiYB25iUAGmXc

6 of 6 new or added lines in 2 files covered. (100.0%)

7 existing lines in 3 files now uncovered.

14721 of 17912 relevant lines covered (82.19%)

1980.09 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
66.67
-20.83% lib/logflare/backends/consolidated_sup_worker.ex
1
90.45
-0.27% lib/logflare/backends/adaptor/clickhouse_adaptor.ex
1
87.1
-3.23% lib/logflare/backends/consolidated_sup.ex
Jobs
ID Job ID Ran Files Coverage
1 33781150459-1.1 03 Sep 2026 05:00PM UTC 459
82.19
GitHub Action Run
Source Files on build 33781150459-1
  • Tree
  • List 459
  • Changed 7
  • Source Changed 2
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #33781150...
  • 2d4b25e9 on github
  • Prev Build on main (#33677996...)
  • Next Build on main (#33789332...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc