Skip to content

Fix an issue tsh throws assertion error on REDIS_REPLY_STATUS for Redis 7#19364

Merged
greedy52 merged 6 commits intomasterfrom
STeve/19240_fix_an_issue_REDIS_REPLY_STATUS
Dec 15, 2022
Merged

Fix an issue tsh throws assertion error on REDIS_REPLY_STATUS for Redis 7#19364
greedy52 merged 6 commits intomasterfrom
STeve/19240_fix_an_issue_REDIS_REPLY_STATUS

Conversation

@greedy52
Copy link
Copy Markdown
Contributor

Fixes #19240

Error from tsh db connect <redis-7>

$ tsh db connect --db-user=test marek-redis07
Assertion failed: (flags->element[j]->type == REDIS_REPLY_STATUS), function cliAddArgument, file redis-cli.c, line 585.
ERROR: signal: abort trap

Root cause:
redis-cli sends COMMAND DOCS to construct docs for commands and expect status type (+<status>) as part of the response. The go-redis driver however reads status into golang strings and writes them as string types ($<len><string>).

Changes:

Notes:

  • COMMAND DOCS is new to Redis 7, so using redis-cli 6.2 would not see this issue
  • There was a test escpae from my side when first testing out Redis 7 as I was testing with a user without COMMAND XXX permissions so redis-cli will always get NO PERM thus not seeing this error.

@greedy52 greedy52 added database-access Database access related issues and PRs db/redis backport/branch/v11 labels Dec 14, 2022
@greedy52 greedy52 self-assigned this Dec 14, 2022

"github.com/gravitational/trace"
"github.com/jonboulle/clockwork"
"github.com/siddontang/go/log"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caught this when go mod tidy tries to add this a "direct" dependency

@github-actions github-actions Bot removed the request for review from Tener December 14, 2022 17:34
@greedy52 greedy52 enabled auto-merge (squash) December 14, 2022 18:24
@greedy52 greedy52 merged commit 72d27ec into master Dec 15, 2022
@github-actions
Copy link
Copy Markdown
Contributor

@greedy52 See the table below for backport results.

Branch Result
branch/v11 Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database-access Database access related issues and PRs db/redis

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS Redis ElastiCache 7.0.4 Engine Version failing to connect

3 participants