openresty / openresty/lua-resty-redis

Frosen while operation keys("*")

Open
#163 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
2k
Forks
447
Avg merge
2h 24m
Merged PRs (30d)
3

Description

Hello
I use this code to get all data from db
Count of all is 200k
One record contain 10 symbols

local master, err = rc:connect_via_sentinel(params)
local res, err = master:keys("*")
            
            if not res then
                ngx.say("Failed to get fingerprints of certificates: ", err)
                return
            end
            
            if res == ngx.null or table.getn(res) == 0 then
                ngx.say("Fingerprints not found.")
                return
            else
                ngx.say("All fingerprints")
                
                for i, r in pairs(res) do
                    ngx.say(i, ") ", r)
                end
            end

I get master from sentinel and work with it . So I don't include code of getting master
It works fine with not more records

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied master:keys("*") loop with a large Redis dataset and inspect the client entry point behind master:keys. Compare its behavior with Redis command semantics and Sentinel-backed connections. Done means the freeze is explained and the issue has a scoped fix or a documented limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, redis
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.