Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlightIbuki committed Nov 21, 2024
1 parent 47d5349 commit a437c53
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion .requirements
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ LIBEXPAT_SHA256=d4cf38d26e21a56654ffe4acd9cd5481164619626802328506a2869afab29ab3
# Note: git repositories can be loaded from local path if path is set as value

LUA_KONG_NGINX_MODULE=3eb89666f84348fa0599d4e0a29ccf89511e8b75 # 0.13.0
LUA_RESTY_LMDB=890b3caf45bd052e319e48349ef393ec93e08ac4 # 1.5.0
LUA_RESTY_LMDB=f8106a4e8024baa62658e483c29b3f8f21d15ac3 # 1.5.1
LUA_RESTY_EVENTS=bc85295b7c23eda2dbf2b4acec35c93f77b26787 # 0.3.1
LUA_RESTY_SIMDJSON=7e6466ce91b2bc763b45701a4f055e94b1e8143b # 1.1.0
LUA_RESTY_WEBSOCKET=966c69c39f03029b9b42ec0f8e55aaed7d6eebc0 # 0.4.0.1
Expand Down
11 changes: 0 additions & 11 deletions kong/db/strategies/off/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,24 +120,13 @@ local function page_for_prefix(self, prefix, size, offset, options, follow)
size = self.connector:get_page_size(options)
end

-- LMDB 'page_size' can not be less than 2
-- see: https://github.com/Kong/lua-resty-lmdb?tab=readme-ov-file#page
size = math.max(size, LMDB_MIN_PAGE_SIZE)

offset = offset or prefix

local res, err_or_more = lmdb_prefix.page(offset, prefix, nil, size)
if not res then
return nil, err_or_more
end

-- special handling for page size 1.
-- drop other results
if size == 1 and size < res then
res = { res[1] }
err_or_more = true
end

local ret = {}
local ret_idx = 0
local schema = self.schema
Expand Down

0 comments on commit a437c53

Please sign in to comment.