Skip to content

"Nested batches are not supported" with Pipeline and Json.SetAsync #401

Description

@concueror

Using NUnit.

`
var db = _redis.GetDatabase();

    var pipeline = new Pipeline(db);
    
    var setTask = 
        pipeline.Json.SetAsync(key, "$", value, when);
    _ = pipeline.Db.KeyExpireAsync(key, ttl);
    
    pipeline.Execute();
    
    return await setTask;

`

Exception:
System.NotSupportedException : Nested batches are not supported at StackExchange.Redis.RedisDatabase.CreateBatch(Object asyncState) in /_/src/StackExchange.Redis/RedisDatabase.cs:line 24 at NRedisStack.Pipeline..ctor(IDatabase db) at NRedisStack.Auxiliary.SetInfoInPipeline(IDatabase db) at NRedisStack.Auxiliary.ExecuteAsync(IDatabaseAsync db, SerializedCommand command) at NRedisStack.JsonCommandsAsync.SetAsync(RedisKey key, RedisValue path, RedisValue json, When when)

Going to NRedisStack.Auxiliary, here is creating new pipeline (and new batch inside it):

Image

So getting "System.NotSupportedException : Nested batches are not supported"

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions