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

Logflare / logflare / fde44b4e5d3f0a232831987dc49dbcc64751137b / 1
82%
main: 82%

Build:
DEFAULT BRANCH: main
Ran 01 Jul 2026 06:36PM UTC
Files 488
Run time 24s
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

01 Jul 2026 06:22PM UTC coverage: 81.793% (+0.01%) from 81.779%
fde44b4e5d3f0a232831987dc49dbcc64751137b.1

push

github

web-flow
fix(ingest queue): tolerate dead ETS table when truncating (#3647)

* fix(ingest queue): tolerate dead ETS table when truncating

QueueJanitor crashes were caused by an ArgumentError in the truncate
path when a producer-owned ETS table was reclaimed mid-call. The
guards (get_tid != nil, :ets.info/2 size) only narrow the window: the
owning producer can still die between tid resolution and the
:ets.delete_all_objects / select_delete / insert calls, raising
ArgumentError that terminates the janitor gen_server (~60 crashes/6h
in prod).

Split tid resolution from the ETS work by extracting a public
truncate_tid/3 (the tid-based counterpart to truncate_table/3,
mirroring delete_id/2 and update_status/3). Both clauses rescue
ArgumentError, emit the existing :stale_table telemetry, and return
{:error, :not_initialized} instead of crashing. The size-bounded
clause also tolerates an :ets.info/2 :undefined result (table
reclaimed before the size read) via its with/else. The caller
(QueueJanitor.drop_queue/5) already ignores the return value.

The extracted truncate_tid/3 is also a test seam: a regression test
drives it with a reclaimed tid (the window truncate_table/3 hides
behind get_tid/1's liveness check) and asserts graceful handling plus
telemetry. Without the rescue these tests raise the prod ArgumentError.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* collapse identical telemetry calls into private `emit_stale_ets_table_telemetry/0` func

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Adam Mokan <amokan@gmail.com>

13558 of 16576 relevant lines covered (81.79%)

5113.78 hits per line

Source Files on job fde44b4e5d3f0a232831987dc49dbcc64751137b.1
  • Tree
  • List 488
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 0
  • fde44b4e on github
  • Prev Job for on main (#8a1e068ddc2a918654a0345c862a12f125ab8e3d.1)
  • Next Job for on main (#5ab7b7fcef98f7ab45df7afb23212d67cd0a05e1.1)
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