Skip to content

Commit

Permalink
chore(constants) add new shms to required list
Browse files Browse the repository at this point in the history
Render newly added shared dicts required. As 0.14 ships with breaking
changes and other nginx configuration changes, now is a good time to
render recent shared dicts mandatory.

See #3550
See #3311
  • Loading branch information
thibaultcha committed Jun 18, 2018
1 parent 7695d29 commit 826b93b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions kong/cache.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ function _M.new(opts)
end

local mlcache, err = resty_mlcache.new(SHM_CACHE, SHM_CACHE, {
shm_miss = ngx.shared.kong_db_cache_miss and "kong_db_cache_miss" or nil,
shm_locks = ngx.shared.kong_locks and "kong_locks" or nil,
shm_miss = "kong_db_cache_miss",
shm_locks = "kong_locks",
shm_set_retries = 3,
lru_size = LRU_SIZE,
ttl = max(opts.ttl or 3600, 0),
Expand Down
3 changes: 3 additions & 0 deletions kong/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ return {
},
DICTS = {
"kong",
"kong_locks",
"kong_cache",
"kong_db_cache_miss",
"kong_process_events",
"kong_cluster_events",
"kong_healthchecks",
"kong_rate_limiting_counters",
},
DATABASE = {
POSTGRES = {
Expand Down
2 changes: 1 addition & 1 deletion kong/plugins/rate-limiting/policies/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local reports = require "kong.reports"


local ngx_log = ngx.log
local shm = ngx.shared.kong_rate_limiting_counters or ngx.shared.kong_cache
local shm = ngx.shared.kong_rate_limiting_counters
local pairs = pairs
local fmt = string.format

Expand Down
2 changes: 1 addition & 1 deletion kong/plugins/response-ratelimiting/policies/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local reports = require "kong.reports"


local ngx_log = ngx.log
local shm = ngx.shared.kong_rate_limiting_counters or ngx.shared.kong_cache
local shm = ngx.shared.kong_rate_limiting_counters
local pairs = pairs
local fmt = string.format

Expand Down

0 comments on commit 826b93b

Please sign in to comment.