newrelic / newrelic/newrelic-java-agent

Investigate an alternative to Caffeine weak ref map

Open
#2,263 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
240
Forks
170
Avg merge
3d 2h
Merged PRs (30d)
21

Description

Description

It has happened that the weak ref map used to cache values in the agent has caused thread locks, preventing customer requests from completing.

https://github.com/raphw/weak-lock-free may provide an alternative.
It seems it would also cause locking if multiple threads try to write to the map, but this may alleviate some of the problems seen with Caffeine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the agent's Caffeine weak reference map and tracing how it is accessed by multiple threads. Compare that usage with raphw/weak-lock-free, then document whether it avoids the reported locking and what changes would be required; the investigation is done when an alternative and its concurrency trade-offs are established.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
observability-sre
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.