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

Logflare / logflare / 3a56c0e53fc0cdbd02b51417a0ca9b717084835b-PR-3626
82%
main: 82%

Build:
Build:
LAST BUILD BRANCH: refactor/source-schema-from-flatmap
DEFAULT BRANCH: main
Ran 22 Jun 2026 11:31PM UTC
Jobs 1
Files 487
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

22 Jun 2026 11:16PM UTC coverage: 81.421% (-0.04%) from 81.461%
3a56c0e53fc0cdbd02b51417a0ca9b717084835b-PR-3626

Pull #3626

github

djwhitt
refactor(ingest queue): timestamp-based stale :processing recovery

Replace the snapshot/intersection stale-detection in QueueJanitor with a
per-row monotonic claim timestamp. Each queue row gains a sixth field,
claimed_at, set to System.monotonic_time(:millisecond) when a row is claimed
into :processing and reset to 0 on every transition back out. The janitor now
selects :processing rows whose claimed_at is older than a fixed staleness age
instead of building and diffing MapSets of in-flight IDs each cycle.

Stale cleanup is treated as crash recovery rather than normal queue
maintenance: the cadence is slowed to 60s, rows are considered stale after
120s, and each pass is bounded to 1000 rows per queue (logging when the cap is
hit). The retry-then-drop ladder and the select_replace CAS guard are
unchanged.

The claim path reads the clock once per take_pending_ids batch (not per
event) and stamps every row in the batch with the same value. No separate
processing_count is maintained; the bounded select runs each pass.

Status is pinned to :processing in the stale match head, so pending/ingested
rows (claimed_at == 0) are never selected regardless of the monotonic clock's
sign — avoiding a sentinel guard that would misbehave with negative monotonic
time.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pull Request #3626: refactor(ingest queue): timestamp-based stale :processing recovery

29 of 34 new or added lines in 3 files covered. (85.29%)

11 existing lines in 5 files now uncovered.

13327 of 16368 relevant lines covered (81.42%)

5139.36 hits per line

Uncovered Changes

Lines Coverage ∆ File
5
82.76
-3.99% lib/logflare/backends/ingest_event_queue/queue_janitor.ex

Coverage Regressions

Lines Coverage ∆ File
5
66.67
-20.83% lib/logflare/backends/consolidated_sup_worker.ex
3
82.76
-3.99% lib/logflare/backends/ingest_event_queue/queue_janitor.ex
1
30.77
-3.85% lib/logflare/sources/source/text_notification_server.ex
1
14.29
-7.14% lib/logflare/system_metrics/cluster.ex
1
56.47
-1.18% lib/telemetry.ex
Jobs
ID Job ID Ran Files Coverage
1 3a56c0e53fc0cdbd02b51417a0ca9b717084835b-PR-3626.1 22 Jun 2026 11:31PM UTC 487
81.42
GitHub Action Run
Source Files on build 3a56c0e53fc0cdbd02b51417a0ca9b717084835b-PR-3626
  • Tree
  • List 487
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #3626
  • PR Base - main (#328E4BCB...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc