apache / apache/curator

Optimize storage for single-node CuratorCache

Open
#1,304 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Currently the `CuratorCache` will use a `ConcurrentHashMap` to store data even if only a single node is being cached (`CuratorCache.Options.SINGLE_NODE_CACHE`).

Instead we should optimize and use an `AtomicReference` instead in this case.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the CuratorCache implementation and trace the CuratorCache.Options.SINGLE_NODE_CACHE path that currently stores data in a ConcurrentHashMap. Confirm the single-node path can use an AtomicReference without changing cache behavior, then run the existing CuratorCache tests and ensure they still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.