Skip to content

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

Closed
@concueror

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"

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