redis / redis/node-redis

Invoke GET method with promisify but return redis server info.

Open
#1,519 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

Issue

I use promisify to create a getAsync function, and I use this function to get data from redis, some code like below:
const getAsync = util.promisify(redisClient.GET).bind(redisClient); let userDataUuid = await getAsync(buildUserNameCacheKey(TID, userName));
but in my log this "userDataUuid" is below, it sames redis server info.

Server^M

redis_version:5.0.5^M
redis_git_sha1:00000000^M
redis_git_dirty:0^M
redis_build_id:442b43d467cd2b03^M

and here is my retry_strategy, I need retry evertytime, I think maybe retry logic made that server info response.
retry_strategy: function(options) { logger.info("Test Redis connection!"); // reconnect after return Math.min(options.attempt * 100, 30000); }


Environment
  • node-redis Version: 2.8.0

  • Node.js Version: docker image node:10-alpine

  • Redis Version: 5.0.5

  • Platform: Linux

Contributor guide

Open the contributing guide

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

Reproduce the reported GET call with node-redis 2.8.0, Node.js 10, Redis 5.0.5, and the supplied retry_strategy. Start by tracing the promisified GET entry point and retry behavior; done means determining why Redis server info is returned and documenting or correcting the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, redis
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.