live: rename url param - assume stable schema by default (#33383)

This commit is contained in:
Alexander Emelin
2021-04-26 20:46:26 +03:00
committed by GitHub
parent c41b5d80a3
commit 2abd9bc3b9
6 changed files with 21 additions and 19 deletions
+3 -2
View File
@@ -92,7 +92,8 @@ func (s *ManagedStream) ListChannels(prefix string) []util.DynMap {
}
// Push sends frame to the stream and saves it for later retrieval by subscribers.
func (s *ManagedStream) Push(path string, frame *data.Frame, stableSchema bool) error {
// unstableSchema flag can be set to disable schema caching for a path.
func (s *ManagedStream) Push(path string, frame *data.Frame, unstableSchema bool) error {
// Keep schema + data for last packet.
frameJSON, err := data.FrameToJSON(frame, true, true)
if err != nil {
@@ -100,7 +101,7 @@ func (s *ManagedStream) Push(path string, frame *data.Frame, stableSchema bool)
return err
}
if stableSchema {
if !unstableSchema {
// If schema is stable we can safely cache it, and only send values if
// stream already has schema cached.
s.mu.Lock()