openresty / openresty/lua-nginx-module
Whether nginx shared dict 'lpop' command delete the key of list or not?
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.8k
- Forks
- 2.1k
- Avg merge
- 6h 1m
- Merged PRs (30d)
- 6
Description
Openresty version: 1.13.6.2
According to our business needs, we need to create a list in nginx shared dict every second and put some elements into it, then there is a timer thread in nginx consumes the elements in the list with "lpop" command.
In our test environment, after "lpop" all the elements in the list, the key of the list will be "disappeared" automatically. But in our product environment, the key is still there even though the value of the list is empty. Since we will create a list in shared dict every second, it results in OOM in the specific shared dict.
We don't find any conclusions about the behavior of key of list data structure in shared dict in openresty official website. Does anyone know why this happened?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the shared-dict list behavior described for OpenResty 1.13.6.2, focusing on the lpop command after the list becomes empty. Compare the test and product environments and inspect the shared-dict lpop entry point or documentation. Done means the key-retention behavior and resulting memory use are explained, documented, or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, nginx
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100