lua-nginx-module icon indicating copy to clipboard operation
lua-nginx-module copied to clipboard

Implement ngx.shared.DICT.decr method

Open p0pr0ck5 opened this issue 8 years ago • 9 comments
trafficstars

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.

p0pr0ck5 avatar Dec 30 '16 02:12 p0pr0ck5

No idea why there's a conflict here :|

p0pr0ck5 avatar Dec 30 '16 04:12 p0pr0ck5

Ok, finally got a proper re-base done!

p0pr0ck5 avatar Dec 30 '16 04:12 p0pr0ck5

The lua-resty-core relative for this PR is at https://github.com/openresty/lua-resty-core/pull/77

p0pr0ck5 avatar Jan 02 '17 20:01 p0pr0ck5

@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 :)

agentzh avatar Jan 09 '17 19:01 agentzh

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 avatar Jan 10 '17 01:01 p0pr0ck5

@p0pr0ck5 Hello, will you have a time to re-implement this feature via lua-resty-core's FFI method?

hongliang5316 avatar Feb 25 '19 04:02 hongliang5316

Do you mean https://github.com/openresty/lua-resty-core/pull/77?

p0pr0ck5 avatar Feb 25 '19 19:02 p0pr0ck5

@p0pr0ck5 Hello, Yeah, LGTM, thanks!

hongliang5316 avatar Feb 26 '19 04:02 hongliang5316

This pull request is now in conflict :(

mergify[bot] avatar Jun 26 '20 00:06 mergify[bot]