You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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):
So getting "System.NotSupportedException : Nested batches are not supported"
The text was updated successfully, but these errors were encountered:
hi @concueror , thanks for using NRedisStack and reporting the issue.
as i see this is caused when the first command using db is in a pipeline and it attempts to set some info on connection. I will explore how to solve it.
Meanwhile could you try to follow this as a workaround;
send an initial command on db object without a pipeline (this will set up the info on conn)
then use the pipeline as you need with same db object
Using NUnit.
`
var db = _redis.GetDatabase();
`
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):
So getting "System.NotSupportedException : Nested batches are not supported"
The text was updated successfully, but these errors were encountered: