OtlpHttpFanOut::gc has no callers, so pipelines for deleted exporters are never stopped
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 157
- Forks
- 32
- Avg merge
- 1h 25m
- Merged PRs (30d)
- 145
Description
OtlpHttpFanOut::gc (crates/aisix-obs/src/otlp_http_sink.rs:263)
documents itself as "Called periodically by the server to GC pipelines for
deleted / disabled exporters", but git grep '\.gc(' returns no callers
anywhere in the tree. Nothing ever reaps them.
Consequence: when an operator deletes or disables an observability
exporter, the fan-out stops handing it events (the exporter is gone from
the snapshot), but its pipeline — task, client, queue — stays alive for the
life of the process. A deployment that churns exporters accumulates them.
Found while auditing api7/aisix#953, which tightened the adjacent
behaviour: the fan-out now re-reads the live snapshot rather than the
request's frozen one, so a deleted exporter stops receiving events
immediately. That closes the delivery side; this issue is the resource side,
and it predates that PR — gc has never been wired.
Worth deciding between two shapes rather than just adding a caller:
- call
gcfrom the existing snapshot-apply path, so reaping is driven by
the config change that caused it, or - call it from a periodic task, which is what the doc comment assumes.
The first is more precise and has no idle cost; the second is more forgiving
if a pipeline can outlive its exporter for reasons other than deletion.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/aisix-obs/src/otlp_http_sink.rs:263 and inspect OtlpHttpFanOut::gc, then trace the existing snapshot-apply path. Use git grep '.gc(' to confirm the missing caller and compare whether snapshot-driven or periodic invocation fits the surrounding lifecycle. Done means deleted or disabled exporter pipelines are reaped without accumulating tasks, clients, or queues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100