counter.reset when the key is not initialized
- Dominant language
- Perl
- Stars
- 23
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
As per this line https://github.com/Kong/lua-resty-counter/blob/master/lib/resty/counter.lua#L98 , if the `key` is not initialized in shared dict, it would always be initialized with 0, no matter what the value of the argument `number` is? Is this the right understanding? If yes, should it be that way?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/resty/counter.lua at line 98 and trace counter.reset when the key is absent from the shared dictionary. Confirm whether the number argument is intentionally ignored in that case; done means the expected behavior is clarified and the implementation or coverage reflects the decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100