apache / apache/rocketmq-dashboard
Bound Message Explorer trace request cache
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 683
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 58
Description
## Problem
Message Explorer keeps an in-flight trace request in `traceCacheRef` so reopening the same message does not issue duplicate work. The cache is a plain `Map` and successful entries are never evicted. Every distinct combination of instance, topic, message ID, and custom trace topic therefore remains referenced for the lifetime of the page component.
Operators who investigate many messages during a long dashboard session can steadily grow this map. The trace result promises retain their resolved value and any captured response data even though the UI only needs the most recent investigation. Failed requests are removed, but successful requests have no bound or expiry.
## Expected behavior
- bound the number of retained trace entries and evict the least-recently-used or oldest entries;
- keep in-flight request de-duplication intact;
- remove rejected requests as today;
- make the bound explicit and test the eviction behavior;
- do not change trace query results or history recording.
This is a client-side lifecycle issue in Message Explorer, separate from trace request correctness and from server-side query history retention.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in the Message Explorer code at the traceCacheRef Map and inspect how entries are added, reused, and removed on rejection. Add an explicit retention bound while preserving in-flight de-duplication and history recording, then add or run the relevant Message Explorer tests to verify oldest-entry eviction, successful reuse, and rejected-request removal.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100