lua-nginx-module
lua-nginx-module copied to clipboard
Implement ngx.shared.DICT.decr method
I hereby granted the copyright of the changes in this pull request to the authors of this lua-nginx-module project.
Implement a counterpart to ngx.shared.DICT.incr that decrements the numeric value at a given key, with an optional init. In addition, decr() cannot receive a negative value, cannot decrement past 0, and cannot initialize a value less than zero.
See #826 for more details and initial proposal.
No idea why there's a conflict here :|
Ok, finally got a proper re-base done!
The lua-resty-core relative for this PR is at https://github.com/openresty/lua-resty-core/pull/77
@p0pr0ck5 I think we'd better only add this new decr method to lua-resty-core's FFI-based implementation. I do not want to maintain two parallel implementations for new API functions any more :)
Are we then blocked on https://github.com/openresty/lua-nginx-module/issues/949? Or can we get this feature added in as-is, and then move forward with FFI-only implementations post 1.11.8.1? Personally I would like to see this go in now, but I'm biased ;)
@p0pr0ck5 Hello, will you have a time to re-implement this feature via lua-resty-core's FFI method?
Do you mean https://github.com/openresty/lua-resty-core/pull/77?
@p0pr0ck5 Hello, Yeah, LGTM, thanks!
This pull request is now in conflict :(