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
When trying to update a stream against a cluster and using mirroring and an optional start time for that mirror, we get an error saying that we're unable to update the mirror configuration, even though we're not changing it.
The posted code works fine against local running instance, but not against a cluster, super-cluster, or Synadia Cloud.
(fill in own jwt and seed for synadia cloud to test)
[Fact]publicasyncTaskMirrorTimeTest(){// USE LOCAL HOST//await using var server = NatsServer.Start(// outputHelper: _output,// opts: new NatsServerOptsBuilder()// .UseTransport(TransportType.Tcp)// .Trace()// .UseJetStream()// .Build());//var nats = server.CreateClientConnection(new NatsOpts { RequestTimeout = TimeSpan.FromSeconds(10) });// Use Synadia Cloudvarnats=newNatsConnection(newNatsOpts{Url="tls://connect.ngs.global",AuthOpts=newNatsAuthOpts{Jwt="",Seed=""}});awaitnats.ConnectAsync();{varjs=newNatsJSContext(nats);// Create streamvarstream=awaitjs.CreateStreamAsync(config:newStreamConfig{Name="events",Subjects=new[]{"events.*"},MaxBytes=100000,});// Test basic mirror stream - THIS WORKS FINE{varbasicMirrorStream=awaitjs.CreateStreamAsync(config:newStreamConfig{Name="events_mirror_basic",Mirror=newStreamSource{Name="events"},Retention=StreamConfigRetention.Limits,Discard=StreamConfigDiscard.Old,MaxBytes=100000,AllowRollupHdrs=true,DenyDelete=false,DenyPurge=false,AllowDirect=true,});{varconfig=basicMirrorStream.Info.Config;config.Description="updated mirror";varresult=awaitjs.UpdateStreamAsync(config);Assert.Equal(config.Description,result.Info.Config.Description);}}// Test mirror stream with optional start time{vartimedMirrorStream=awaitjs.CreateStreamAsync(config:newStreamConfig{Name="events_mirror_timed",Mirror=newStreamSource{Name="events",OptStartTime=DateTimeOffset.Parse("2024-01-01T00:00:00+00:00")},Retention=StreamConfigRetention.Limits,Discard=StreamConfigDiscard.Old,MaxBytes=100000,AllowRollupHdrs=true,DenyDelete=false,DenyPurge=false,AllowDirect=true,});{varconfig=timedMirrorStream.Info.Config;config.Description="updated mirror";varresult=awaitjs.UpdateStreamAsync(config);Assert.Equal(config.Description,result.Info.Config.Description);}}// Get the existing stream config{varexistingStreamInfo=awaitjs.GetStreamAsync("events_mirror_timed");varconfig=existingStreamInfo.Info.Config;config.Description="updated description";varresult=awaitjs.UpdateStreamAsync(config);}}}
The text was updated successfully, but these errors were encountered:
Observed behavior
When trying to update a stream against a cluster and using mirroring and an optional start time for that mirror, we get an error saying that we're unable to update the mirror configuration, even though we're not changing it.
The posted code works fine against local running instance, but not against a cluster, super-cluster, or Synadia Cloud.
Expected behavior
Should work against a cluster
Server and client version
Latest .Net client source, latest server, latest synadia cloud.
Host environment
No response
Steps to reproduce
(fill in own jwt and seed for synadia cloud to test)
The text was updated successfully, but these errors were encountered: