cloudflare / cloudflare/pingora

Optimize memory cache's singleflight performance

Open
#110 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
27.4k
Forks
1.7k
Avg merge
6h 22m
Merged PRs (30d)
3

Description

## What is the problem your feature solves, or the need it fulfills?

Acquiring write locks is not that easy in a high-concurrency environment,
imagine there are many read lock requests, the write lock will be acquired later.
After write lock acquired perhaps another one has already completed the lookup and removed the lock from locker container.

## Describe the solution you'd like

After write lock acquired, we should first check whether data already exists at the current point.

## Describe alternatives you've considered

What other solutions, features, or workarounds have you considered that might also solve the issue?
What are the tradeoffs for these alternatives compared to what you're proposing?

## Additional context

This could include references to documentation or papers, prior art, screenshots, or benchmark
results.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.