Skip to content

Commit

Permalink
feat(db): restore default db page size
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw committed Nov 22, 2024
1 parent fa9bed9 commit 52471a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kong/db/strategies/connector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ local fmt = string.format
local Connector = {
defaults = {
pagination = {
page_size = 512, -- work with lmdb
max_page_size = 512, -- work with lmdb
page_size = 1000,
max_page_size = 50000,
},
},
}
Expand Down
6 changes: 6 additions & 0 deletions kong/db/strategies/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ function _M.new(kong_config, database, schemas, errors)

do
local base_connector = require "kong.db.strategies.connector"

-- lmdb will not support huge page size
if database == "off" then
base_connector.defaults.pagination.max_page_size = 2048
end

local mt = getmetatable(connector)
setmetatable(mt, {
__index = function(t, k)
Expand Down

0 comments on commit 52471a2

Please sign in to comment.