Invoke GET method with promisify but return redis server info.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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