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
lib/logstorage: reduce the propbability of improper usage of LogRows.MustAdd() function
The LogRows.MustAdd function was accepting streamFields []Field as the last arg.
VictoriaLogs data model expects that all the stream fields exist in the log fields.
The LogRows.MustAdd() function was easy to misuse by passing streamFields, which are missing in the fields slice.
This could result in violation of VictoriaLogs data model - e.g. there could be stream fields,
which are searchable via {field_name=value} syntax, while aren't searchable via field_name:=value syntax.
Fix this by accepting streamFieldsLen arg instead of streamFields arg at LogRows.MustAdd.
The caller must ensure that the given number of stream fields exist in the beginning of the fields slice.
0 commit comments