Skip to content

Transactions are not well supported in Envoy Redis proxy scenario #2823

@KirilNN

Description

@KirilNN

Hello folks!

We are using SE.Redis client to connect to Envoy Redis proxy. We recently stumbled upon the following issue where our transactions started failing with an error. The minimum repro code is here:

var transaction = cache.CreateTransaction();
            
transaction.AddCondition(Condition.StringEqual("some_key", 1));
            
_ = transaction.StringIncrementAsync("some_key");
_ = transaction.StringSetAsync("some_key", + 1);
var result = await transaction.ExecuteAsync();

When the above is execute against Envoy Redis proxy we observe the following error

Unhandled exception. System.AggregateException: One or more errors occurred. (This operation has been disabled in the command-map and cannot be used: UNWATCH)

The problem comes from the fact that Envoy does not support the UNWATCH command, so maybe this can be replaced by DISCARD in the client, in order to make it compatible with Envoy? Will this be a viable option?

Any help is appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions