[FIXED] JetStream: reject stream update with changes to RePublish

The update was not rejected, yet the republish update was not
taking place.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2022-08-03 16:29:53 -06:00
parent f7387f7762
commit b73afbdcb1
2 changed files with 74 additions and 0 deletions

View File

@@ -1272,6 +1272,10 @@ func (jsa *jsAccount) configUpdateCheck(old, new *StreamConfig, s *Server) (*Str
if !reflect.DeepEqual(cfg.Mirror, old.Mirror) {
return nil, NewJSStreamMirrorNotUpdatableError()
}
// Can't change RePublish
if !reflect.DeepEqual(cfg.RePublish, old.RePublish) {
return nil, NewJSStreamInvalidConfigError(fmt.Errorf("stream configuration update can not change RePublish"))
}
// Do some adjustments for being sealed.
if cfg.Sealed {