Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared dictionary cannot retrieve stale data #217

Closed
fairyqb opened this issue Feb 2, 2024 · 4 comments
Closed

Shared dictionary cannot retrieve stale data #217

fairyqb opened this issue Feb 2, 2024 · 4 comments

Comments

@fairyqb
Copy link

fairyqb commented Feb 2, 2024

Please see the following file example:
shm_stale_resty_test.lua.txt

If this line in the code is commented out, stale data cannot be retrieved from the shared dictionary.

line 12:
dict:set("init_dict", "init", 0)

@zhuizhuhaomeng
Copy link
Contributor

zhuizhuhaomeng commented Feb 2, 2024

@fairyqb

If this line in the code is commented out, stale data cannot be retrieved from the shared dictionary.

This is because the expired entry was reclaimed.
You add init_dict with 0 expired time which means it will not expire.
This entry at the LRU end prevents reclaiming expired entries.

@fairyqb
Copy link
Author

fairyqb commented Feb 2, 2024

@fairyqb

This is because the expired entry was reclaimed. You add init_dict with 0 expired time which means it will not expire. This entry at the LRU end prevents reclaiming expired entries.

This is a different key.

@zhuizhuhaomeng
Copy link
Contributor

@fairyqb why did you reopen this issue?

@zhuizhuhaomeng
Copy link
Contributor

You should move this issue to lua-nginx-module repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants