openresty / openresty/lua-resty-lrucache

question: Does lua-resty-lrucache's get/set method are atomic operations?

Open
#53 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
461
Forks
114
PR merge metrics
No merged PRs in 30d

Description

Does lua-resty-lrucache's get/set method are atomic operations?

In same worker process, Does this happen:
lrucache key X store a string, two request get and set lrucache sametime, get not complete X value.

Contributor guide

No contributing guide indexed for this repository

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 reading the lua-resty-lrucache get and set entry points and the LuaJIT FFI cache implementation. Reproduce two same-worker requests accessing the same key, then determine whether the reported interleaving is possible and document the observed atomicity behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.