StackExchange / StackExchange/StackExchange.Redis

Sometimes IDataBase.ExecuteAsync("JSON.ARRAPPEND") Doesn't Append Items to List in AWS ElastiCache Redis

Open
#2,815 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Description:

We’re running into an issue with the JSON.ARRAPPEND command using StackExchange.Redis with AWS ElastiCache Redis OSS. Occasionally, when we call this command, items don’t actually get appended to the list, even though the command appears to execute without any errors. This happens randomly, so it’s hard to reproduce consistently.

var result = await IDatabase.ExecuteAsync("JSON.ARRAPPEND", [key, listPath, .. serializedItems]);
_logger.LogDebug("Redis JSON.ARRAPPEND command response: {itemsAppended}, {isNull}", result.Length, result.IsNull);

What we’ve observed:

  • When this issue happens, the response shows Length 1 and IsNull False, but the items aren't actually added to the list.
  • There are no exceptions or other indicators suggesting that the action has failed.
  • This issue doesn't happen every time, but it’s random, making it difficult to reproduce consistently.
  • We’re using AWS ElastiCache Redis OSS, and our service is deployed on AWS ECS.

Environment:

  • AWS ElastiCache Redis OSS (7.1.0)
  • StackExchange.Redis (2.8.16)
  • .NET 8
  • Deployed on AWS ECS Fargate

Any help or insight into what might be causing this issue would be greatly appreciated. Thanks in advance!

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

Start by reproducing JSON.ARRAPPEND through IDatabase.ExecuteAsync with AWS ElastiCache Redis OSS 7.1.0, StackExchange.Redis 2.8.16, and .NET 8, comparing the command response with the stored list. Determine why a non-null response with Length 1 can leave items unappended, and document a confirmed cause or resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp, redis
Domain
backend, cloud, 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.