Skip to content

Redis proxy custom_commands not allowed inside transactions #42094

Closed

Description

@agnewp

Title: Redis proxy custom_commands not allowed inside transactions

Description:
I have configured envoy to be a redis proxy in front of AWS Memory DB (valkey engine 7.3). i have added json.set to my custom commands list. When i execute json.set it is treated as a simple command. when i attempt to execute two json.set operations inside a transaction i get the error ...pipeline caused error: 'JSON.SET' command is not supported within transaction

according to the comment in the code here all 'simple' commands should be able to execute in a transaction and all 'custom commands' are supposed to be treated as 'simple' commands.

it appears that the command check here is missing a check to see if the command is in the custom commands list

Repro steps:
requires docker runtime

run-envoy.sh

#!/bin/bash

docker run --rm -it \
-p 9901:9901 -p 6380:6380 \
-v $(pwd):/app \
envoyproxy/envoy:debug-dev \
envoy -c /app/envoy.yaml -l debug
% redis-cli -h localhost -p 6380
localhost:6380> multi
OK
localhost:6380(TX)> json.set somekey $ value
(error) 'json.set' command is not supported within transaction
localhost:6380(TX)> exit
%

Admin and Stats Output:

% curl localhost:9901/clusters
deny::observability_name::deny
deny::default_priority::max_connections::1024
deny::default_priority::max_pending_requests::1024
deny::default_priority::max_requests::1024
deny::default_priority::max_retries::3
deny::high_priority::max_connections::1024
deny::high_priority::max_pending_requests::1024
deny::high_priority::max_requests::1024
deny::high_priority::max_retries::3
deny::added_via_api::false

server_info.log

stats.log

Config:

minimal envoy.yaml for demonstrating issue

node:
  id: memorydb-gw-1
  cluster: memorydb-gw

static_resources:

  listeners:
  - name: redis_listener
    address:
      socket_address:
        address: 0.0.0.0
        port_value: 6380   # Port Envoy will listen on for Redis/Valkey clients
    filter_chains:
    - filters:
      - name: envoy.filters.network.redis_proxy
        typed_config:
          "@type": type.googleapis.com/envoy.extensions.filters.network.redis_proxy.v3.RedisProxy
          stat_prefix: derp
          settings:
            op_timeout: 5s
          prefix_routes:
            catch_all_route:
              cluster: deny # commands allowed to pass envoy will return a no upstream host error(normal)
          custom_commands:
            - json.set # my custom command that should be treated as a 'simple command'
  
  clusters:
  - name: deny
    connect_timeout: 1s
    type: STATIC
    load_assignment:
      cluster_name: deny
      endpoints: []


admin:
  address:
    socket_address: { address: 0.0.0.0, port_value: 9901 }

Logs:
test.log

Call Stack:
N/A - not crashing

Activity

  1. added
    triage
    on Nov 18, 2025
  2. added
    help wanted
    and removed
    triage
    on Nov 19, 2025
  3. wbpcode commented on Nov 19, 2025

    @wbpcode
    Member

    @mattklein123 Hello, Matt, is there any suggestion to this problem?

  4. agnewp commented on Nov 19, 2025

    @agnewp
    Author

    sooooo the creator of envoy and CTO of Bitdrift is the ONLY person who could address this issue? he sounds a little busy... its me or nobody i suppose. time to dust off the c++ skillz.

  5. nbaws commented on Nov 20, 2025

    @nbaws
    Contributor

    @VivekSubr added the custom commands feature - are you able to determine suitability for this in the transaction processing code path? It looks reasonable to me but I'm not a redis expert :)

  6. added a commit that references this issue on Jul 8, 2026
    4cba53a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions