[BUG] AbstractLogCollector.close() drops all buffered logs on shutdown
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
- severity: Medium
- files: `shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/.../AbstractLogCollector.java:256-262`
- description: `close()` sets `started = false` (causing `consume()` to exit) then immediately closes the log consume client. Any logs still in `bufferQueue`/`bufferQueueS` are never flushed. On config refresh, `initClient()` calls `close()` before re-init.
- impact: Data loss — all access logs buffered but not yet flushed at config refresh/shutdown are permanently lost.
- suggested_fix: Drain the buffer queue(s) and send a final batch before closing.
- confidence: High
- related_existing: none
---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/.../AbstractLogCollector.java:256-262 and trace close(), consume(), bufferQueue, and bufferQueueS. Reproduce shutdown or config-refresh behavior, then verify that buffered access logs are retained after close() and before the log consume client is closed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100