diff --git a/CHANGES.md b/CHANGES.md index 353e7084c..fba1df839 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,6 +12,8 @@ Release Notes. - Measure: Introduce "index_mode" to save data exclusively in the series index, ideal for non-timeseries measures. - Index: Use numeric index type to support Int and Float - TopN: Group top n pre-calculation result by the group key in the new introduced `_top_n_result` measure, which is used to store the pre-calculation result. +- Index Mode: Index `measure_nam` and `tags` in `entity` to improve the query performance. +- Encoding: Improve the performance of encoding and decoding the variable-length int64. ### Bug Fixes @@ -43,6 +45,7 @@ Release Notes. ### CVEs - GO-2024-3321: Misuse of ServerConfig.PublicKeyCallback may cause authorization bypass in golang.org/x/crypto +- GO-2024-3333: Non-linear parsing of case-insensitive content in golang.org/x/net/html ## 0.7.0 diff --git a/banyand/internal/storage/index.go b/banyand/internal/storage/index.go index b6f45d267..fc6eea59b 100644 --- a/banyand/internal/storage/index.go +++ b/banyand/internal/storage/index.go @@ -86,13 +86,17 @@ func (s *seriesIndex) Update(docs index.Documents) error { func (s *seriesIndex) filter(ctx context.Context, series []*pbv1.Series, projection []index.FieldKey, secondaryQuery index.Query, timeRange *timestamp.TimeRange, ) (data SeriesData, err error) { - seriesMatchers := make([]index.SeriesMatcher, len(series)) - for i := range series { - seriesMatchers[i], err = convertEntityValuesToSeriesMatcher(series[i]) - if err != nil { - return SeriesData{}, err + var seriesMatchers []index.SeriesMatcher + if len(series) > 0 { + seriesMatchers = make([]index.SeriesMatcher, len(series)) + for i := range series { + seriesMatchers[i], err = convertEntityValuesToSeriesMatcher(series[i]) + if err != nil { + return SeriesData{}, err + } } } + indexQuery, err := s.store.BuildQuery(seriesMatchers, secondaryQuery, timeRange) if err != nil { return SeriesData{}, err @@ -286,6 +290,74 @@ func (s *seriesIndex) Search(ctx context.Context, series []*pbv1.Series, opts In return sd, sortedValues, err } +func (s *seriesIndex) SearchWithoutSeries(ctx context.Context, opts IndexSearchOpts) (sd SeriesData, sortedValues [][]byte, err error) { + tracer := query.GetTracer(ctx) + if tracer != nil { + var span *query.Span + span, ctx = tracer.StartSpan(ctx, "seriesIndex.SearchWithoutSeries") + if opts.Query != nil { + span.Tagf("secondary_query", "%s", opts.Query.String()) + } + defer func() { + if err != nil { + span.Error(err) + } + span.Stop() + }() + } + + if opts.Order == nil || opts.Order.Index == nil { + sd, err = s.filter(ctx, nil, opts.Projection, opts.Query, opts.TimeRange) + if err != nil { + return sd, nil, err + } + return sd, nil, nil + } + var span *query.Span + if tracer != nil { + span, _ = tracer.StartSpan(ctx, "sort") + span.Tagf("preload", "%d", opts.PreloadSize) + defer func() { + if err != nil { + span.Error(err) + } + span.Stop() + }() + } + + iter, err := s.store.SeriesSort(ctx, opts.Query, opts.Order, + opts.PreloadSize, opts.Projection) + if err != nil { + return sd, nil, err + } + defer func() { + err = multierr.Append(err, iter.Close()) + }() + + var r int + for iter.Next() { + r++ + val := iter.Val() + var series pbv1.Series + if err = series.Unmarshal(val.EntityValues); err != nil { + return sd, nil, errors.WithMessagef(err, "failed to unmarshal series: %s", val.EntityValues) + } + sd.SeriesList = append(sd.SeriesList, &series) + sd.Timestamps = append(sd.Timestamps, val.Timestamp) + sd.Versions = append(sd.Versions, val.Version) + if len(opts.Projection) > 0 { + sd.Fields = append(sd.Fields, maps.Clone(val.Values)) + } + sortedValues = append(sortedValues, val.SortedValue) + } + if span != nil { + span.Tagf("query", "%s", iter.Query().String()) + span.Tagf("rounds", "%d", r) + span.Tagf("size", "%d", len(sd.SeriesList)) + } + return sd, sortedValues, err +} + func (s *seriesIndex) Close() error { s.metrics.DeleteAll(s.p.SegLabelValues()...) return s.store.Close() diff --git a/banyand/internal/storage/storage.go b/banyand/internal/storage/storage.go index de058b0ee..3db3f26c0 100644 --- a/banyand/internal/storage/storage.go +++ b/banyand/internal/storage/storage.go @@ -91,6 +91,7 @@ type IndexDB interface { Insert(docs index.Documents) error Update(docs index.Documents) error Search(ctx context.Context, series []*pbv1.Series, opts IndexSearchOpts) (SeriesData, [][]byte, error) + SearchWithoutSeries(ctx context.Context, opts IndexSearchOpts) (sd SeriesData, sortedValues [][]byte, err error) } // TSDB allows listing and getting shard details. diff --git a/banyand/measure/block_metadata.go b/banyand/measure/block_metadata.go index ff23c4af3..a046586a1 100644 --- a/banyand/measure/block_metadata.go +++ b/banyand/measure/block_metadata.go @@ -50,19 +50,13 @@ func (b *dataBlock) marshal(dst []byte) []byte { return dst } -func (b *dataBlock) unmarshal(src []byte) ([]byte, error) { - src, n, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal offset: %w", err) - } +func (b *dataBlock) unmarshal(src []byte) []byte { + src, n := encoding.BytesToVarUint64(src) b.offset = n - src, n, err = encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal size: %w", err) - } + src, n = encoding.BytesToVarUint64(src) b.size = n - return src, nil + return src } type blockMetadata struct { @@ -141,43 +135,30 @@ func (bm *blockMetadata) unmarshal(src []byte) ([]byte, error) { } bm.seriesID = common.SeriesID(encoding.BytesToUint64(src)) src = src[8:] - src, n, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal uncompressedSizeBytes: %w", err) - } + src, n := encoding.BytesToVarUint64(src) bm.uncompressedSizeBytes = n - src, n, err = encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal count: %w", err) - } + src, n = encoding.BytesToVarUint64(src) bm.count = n - src, err = bm.timestamps.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal timestampsMetadata: %w", err) - } - src, n, err = encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal tagFamilies count: %w", err) - } + src = bm.timestamps.unmarshal(src) + src, n = encoding.BytesToVarUint64(src) if n > 0 { if bm.tagFamilies == nil { bm.tagFamilies = make(map[string]*dataBlock, n) } var nameBytes []byte + var err error for i := uint64(0); i < n; i++ { src, nameBytes, err = encoding.DecodeBytes(src) if err != nil { return nil, fmt.Errorf("cannot unmarshal tagFamily name: %w", err) } tf := &dataBlock{} - src, err = tf.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal tagFamily dataBlock: %w", err) - } + src = tf.unmarshal(src) bm.tagFamilies[string(nameBytes)] = tf } } + var err error src, err = bm.field.unmarshal(src) if err != nil { return nil, fmt.Errorf("cannot unmarshal columnFamilyMetadata: %w", err) @@ -274,26 +255,20 @@ func (tm *timestampsMetadata) marshal(dst []byte) []byte { return dst } -func (tm *timestampsMetadata) unmarshal(src []byte) ([]byte, error) { - src, err := tm.dataBlock.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal ts dataBlock: %w", err) - } +func (tm *timestampsMetadata) unmarshal(src []byte) []byte { + src = tm.dataBlock.unmarshal(src) tm.min = int64(encoding.BytesToUint64(src)) src = src[8:] tm.max = int64(encoding.BytesToUint64(src)) src = src[8:] tm.encodeType = encoding.EncodeType(src[0]) src = src[1:] - src, n, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal ts offset: %w", err) - } + src, n := encoding.BytesToVarUint64(src) tm.versionOffset = n tm.versionFirst = int64(encoding.BytesToUint64(src)) src = src[8:] tm.versionEncodeType = encoding.EncodeType(src[0]) - return src[1:], nil + return src[1:] } func unmarshalBlockMetadata(dst []blockMetadata, src []byte) ([]blockMetadata, error) { diff --git a/banyand/measure/block_metadata_test.go b/banyand/measure/block_metadata_test.go index 6bac5d097..8ca919d8e 100644 --- a/banyand/measure/block_metadata_test.go +++ b/banyand/measure/block_metadata_test.go @@ -67,8 +67,7 @@ func Test_dataBlock_marshal_unmarshal(t *testing.T) { unmarshaled := &dataBlock{} - _, err := unmarshaled.unmarshal(marshaled) - require.NoError(t, err) + _ = unmarshaled.unmarshal(marshaled) assert.Equal(t, original.offset, unmarshaled.offset) assert.Equal(t, original.size, unmarshaled.size) @@ -157,8 +156,7 @@ func Test_timestampsMetadata_marshal_unmarshal(t *testing.T) { unmarshaled := ×tampsMetadata{} - _, err := unmarshaled.unmarshal(marshaled) - require.NoError(t, err) + _ = unmarshaled.unmarshal(marshaled) assert.Equal(t, original.dataBlock.offset, unmarshaled.dataBlock.offset) assert.Equal(t, original.dataBlock.size, unmarshaled.dataBlock.size) diff --git a/banyand/measure/column_metadata.go b/banyand/measure/column_metadata.go index 3f7102af0..3238e9a49 100644 --- a/banyand/measure/column_metadata.go +++ b/banyand/measure/column_metadata.go @@ -79,10 +79,7 @@ func (cm *columnMetadata) unmarshal(src []byte) ([]byte, error) { } cm.valueType = pbv1.ValueType(src[0]) src = src[1:] - src, err = cm.dataBlock.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal columnMetadata.dataBlock: %w", err) - } + src = cm.dataBlock.unmarshal(src) return src, nil } @@ -126,14 +123,12 @@ func (cfm *columnFamilyMetadata) marshal(dst []byte) []byte { } func (cfm *columnFamilyMetadata) unmarshal(src []byte) ([]byte, error) { - src, columnMetadataLen, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal columnMetadataLen: %w", err) - } + src, columnMetadataLen := encoding.BytesToVarUint64(src) if columnMetadataLen < 1 { return src, nil } cms := cfm.resizeColumnMetadata(int(columnMetadataLen)) + var err error for i := range cms { src, err = cms[i].unmarshal(src) if err != nil { diff --git a/banyand/measure/query.go b/banyand/measure/query.go index e4f090fab..10f927593 100644 --- a/banyand/measure/query.go +++ b/banyand/measure/query.go @@ -71,8 +71,8 @@ type queryOptions struct { } func (s *measure) Query(ctx context.Context, mqo model.MeasureQueryOptions) (mqr model.MeasureQueryResult, err error) { - if mqo.TimeRange == nil || len(mqo.Entities) < 1 { - return nil, errors.New("invalid query options: timeRange and series are required") + if mqo.TimeRange == nil { + return nil, errors.New("invalid query options: timeRange are required") } if len(mqo.TagProjection) == 0 && len(mqo.FieldProjection) == 0 { return nil, errors.New("invalid query options: tagProjection or fieldProjection is required") @@ -82,14 +82,6 @@ func (s *measure) Query(ctx context.Context, mqo model.MeasureQueryOptions) (mqr return mqr, nil } - series := make([]*pbv1.Series, len(mqo.Entities)) - for i := range mqo.Entities { - series[i] = &pbv1.Series{ - Subject: mqo.Name, - EntityValues: mqo.Entities[i], - } - } - tsdb := db.(storage.TSDB[*tsTable, option]) segments := tsdb.SelectSegments(*mqo.TimeRange) if len(segments) < 1 { @@ -97,7 +89,19 @@ func (s *measure) Query(ctx context.Context, mqo model.MeasureQueryOptions) (mqr } if s.schema.IndexMode { - return s.buildIndexQueryResult(ctx, series, mqo, segments) + return s.buildIndexQueryResult(ctx, mqo, segments) + } + + if len(mqo.Entities) < 1 { + return nil, errors.New("invalid query options: series is required") + } + + series := make([]*pbv1.Series, len(mqo.Entities)) + for i := range mqo.Entities { + series[i] = &pbv1.Series{ + Subject: mqo.Name, + EntityValues: mqo.Entities[i], + } } sids, tables, storedIndexValue, newTagProjection, err := s.searchSeriesList(ctx, series, mqo, segments) @@ -256,7 +260,7 @@ func (s *measure) searchSeriesList(ctx context.Context, series []*pbv1.Series, m return sl, tables, storedIndexValue, newTagProjection, nil } -func (s *measure) buildIndexQueryResult(ctx context.Context, series []*pbv1.Series, mqo model.MeasureQueryOptions, +func (s *measure) buildIndexQueryResult(ctx context.Context, mqo model.MeasureQueryOptions, segments []storage.Segment[*tsTable, option], ) (model.MeasureQueryResult, error) { defer func() { @@ -310,7 +314,7 @@ func (s *measure) buildIndexQueryResult(ctx context.Context, series []*pbv1.Seri opts.TimeRange = mqo.TimeRange } sr := &segResult{} - sr.SeriesData, sr.sortedValues, err = segments[i].IndexDB().Search(ctx, series, opts) + sr.SeriesData, sr.sortedValues, err = segments[i].IndexDB().SearchWithoutSeries(ctx, opts) if err != nil { return nil, err } diff --git a/banyand/measure/topn.go b/banyand/measure/topn.go index c76497814..c2f7c40fa 100644 --- a/banyand/measure/topn.go +++ b/banyand/measure/topn.go @@ -621,10 +621,7 @@ func (t *TopNValue) Unmarshal(src []byte, decoder *encoding.BytesBlockDecoder) e t.valueName = convert.BytesToString(nameBytes) var entityTagNamesCount uint64 - src, entityTagNamesCount, err = encoding.BytesToVarUint64(src) - if err != nil { - return fmt.Errorf("cannot unmarshal topNValue.entityTagNamesCount: %w", err) - } + src, entityTagNamesCount = encoding.BytesToVarUint64(src) t.entityTagNames = make([]string, 0, entityTagNamesCount) var entityTagNameBytes []byte for i := uint64(0); i < entityTagNamesCount; i++ { @@ -636,10 +633,7 @@ func (t *TopNValue) Unmarshal(src []byte, decoder *encoding.BytesBlockDecoder) e } var valuesCount uint64 - src, valuesCount, err = encoding.BytesToVarUint64(src) - if err != nil { - return fmt.Errorf("cannot unmarshal topNValue.valuesCount: %w", err) - } + src, valuesCount = encoding.BytesToVarUint64(src) if len(src) < 1 { return fmt.Errorf("cannot unmarshal topNValue.encodeType: src is too short") @@ -658,10 +652,7 @@ func (t *TopNValue) Unmarshal(src []byte, decoder *encoding.BytesBlockDecoder) e return fmt.Errorf("cannot unmarshal topNValue.valueLen: src is too short") } var valueLen uint64 - src, valueLen, err = encoding.BytesToVarUint64(src) - if err != nil { - return fmt.Errorf("cannot unmarshal topNValue.valueLen: %w", err) - } + src, valueLen = encoding.BytesToVarUint64(src) if uint64(len(src)) < valueLen { return fmt.Errorf("src is too short for reading string with size %d; len(src)=%d", valueLen, len(src)) diff --git a/banyand/measure/write.go b/banyand/measure/write.go index 859cf09ac..35ac5a146 100644 --- a/banyand/measure/write.go +++ b/banyand/measure/write.go @@ -38,6 +38,8 @@ import ( "github.com/apache/skywalking-banyandb/pkg/timestamp" ) +var subjectField = index.FieldKey{TagName: index.IndexModeName} + type writeCallback struct { l *logger.Logger schemaRepo *schemaRepo @@ -112,6 +114,7 @@ func (w *writeCallback) handle(dst map[string]*dataPointsInGroup, writeEvent *me tagFamily, fields := w.handleTagFamily(stm, req) if stm.schema.IndexMode { + fields = w.appendEntityTagsToIndexFields(fields, stm, series) doc := index.Document{ DocID: uint64(series.ID), EntityValues: series.Buffer, @@ -275,6 +278,36 @@ func (w *writeCallback) handleTagFamily(stm *measure, req *measurev1.WriteReques return tagFamilies, fields } +func (w *writeCallback) appendEntityTagsToIndexFields(fields []index.Field, stm *measure, series *pbv1.Series) []index.Field { + f := index.NewStringField(subjectField, series.Subject) + f.Index = true + f.NoSort = true + fields = append(fields, f) + for i := range stm.schema.Entity.TagNames { + tagName := stm.schema.Entity.TagNames[i] + var t *databasev1.TagSpec + for j := range stm.schema.TagFamilies { + for k := range stm.schema.TagFamilies[j].Tags { + if stm.schema.TagFamilies[j].Tags[k].Name == tagName { + t = stm.schema.TagFamilies[j].Tags[k] + } + } + } + + encodeTagValue := encodeTagValue( + t.Name, + t.Type, + series.EntityValues[i]) + if encodeTagValue.value != nil { + f = index.NewBytesField(index.FieldKey{TagName: index.IndexModeEntityTagPrefix + t.Name}, encodeTagValue.value) + f.Index = true + f.NoSort = true + fields = append(fields, f) + } + } + return fields +} + func (w *writeCallback) Rev(_ context.Context, message bus.Message) (resp bus.Message) { events, ok := message.Data().([]any) if !ok { diff --git a/banyand/stream/block_metadata.go b/banyand/stream/block_metadata.go index 4f410cd59..d06e21824 100644 --- a/banyand/stream/block_metadata.go +++ b/banyand/stream/block_metadata.go @@ -50,19 +50,13 @@ func (d *dataBlock) marshal(dst []byte) []byte { return dst } -func (d *dataBlock) unmarshal(src []byte) ([]byte, error) { - src, n, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal offset: %w", err) - } +func (d *dataBlock) unmarshal(src []byte) []byte { + src, n := encoding.BytesToVarUint64(src) d.offset = n - src, n, err = encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal size: %w", err) - } + src, n = encoding.BytesToVarUint64(src) d.size = n - return src, nil + return src } type blockMetadata struct { @@ -142,50 +136,30 @@ func (bm *blockMetadata) unmarshal(src []byte) ([]byte, error) { } bm.seriesID = common.SeriesID(encoding.BytesToUint64(src)) src = src[8:] - src, n, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal uncompressedSizeBytes: %w", err) - } + src, n := encoding.BytesToVarUint64(src) bm.uncompressedSizeBytes = n - src, n, err = encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal count: %w", err) - } + src, n = encoding.BytesToVarUint64(src) bm.count = n - src, err = bm.timestamps.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal timestampsMetadata: %w", err) - } - src, err = bm.elementIDs.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal elementIDsMetadata: %w", err) - } - src, n, err = encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal tagFamilies count: %w", err) - } + src = bm.timestamps.unmarshal(src) + src = bm.elementIDs.unmarshal(src) + src, n = encoding.BytesToVarUint64(src) if n > 0 { if bm.tagFamilies == nil { bm.tagFamilies = make(map[string]*dataBlock, n) } var nameBytes []byte + var err error for i := uint64(0); i < n; i++ { src, nameBytes, err = encoding.DecodeBytes(src) if err != nil { return nil, fmt.Errorf("cannot unmarshal tagFamily name: %w", err) } tf := &dataBlock{} - src, err = tf.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal tagFamily dataBlock: %w", err) - } + src = tf.unmarshal(src) bm.tagFamilies[string(nameBytes)] = tf } } - if err != nil { - return nil, fmt.Errorf("cannot unmarshal tagFamilyMetadata: %w", err) - } return src, nil } @@ -270,23 +244,17 @@ func (tm *timestampsMetadata) marshal(dst []byte) []byte { return dst } -func (tm *timestampsMetadata) unmarshal(src []byte) ([]byte, error) { - src, err := tm.dataBlock.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal ts blockData: %w", err) - } +func (tm *timestampsMetadata) unmarshal(src []byte) []byte { + src = tm.dataBlock.unmarshal(src) tm.min = int64(encoding.BytesToUint64(src)) src = src[8:] tm.max = int64(encoding.BytesToUint64(src)) src = src[8:] tm.encodeType = encoding.EncodeType(src[0]) src = src[1:] - src, n, err := encoding.BytesToVarUint64(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal ts offset: %w", err) - } + src, n := encoding.BytesToVarUint64(src) tm.elementIDsOffset = n - return src, nil + return src } type elementIDsMetadata struct { @@ -310,13 +278,10 @@ func (em *elementIDsMetadata) marshal(dst []byte) []byte { return dst } -func (em *elementIDsMetadata) unmarshal(src []byte) ([]byte, error) { - src, err := em.dataBlock.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal dataBlock: %w", err) - } +func (em *elementIDsMetadata) unmarshal(src []byte) []byte { + src = em.dataBlock.unmarshal(src) em.encodeType = encoding.EncodeType(src[0]) - return src[1:], nil + return src[1:] } func unmarshalBlockMetadata(dst []blockMetadata, src []byte) ([]blockMetadata, error) { diff --git a/banyand/stream/block_metadata_test.go b/banyand/stream/block_metadata_test.go index 007518592..1c33fa510 100644 --- a/banyand/stream/block_metadata_test.go +++ b/banyand/stream/block_metadata_test.go @@ -66,8 +66,7 @@ func Test_dataBlock_marshal_unmarshal(t *testing.T) { unmarshaled := &dataBlock{} - _, err := unmarshaled.unmarshal(marshaled) - require.NoError(t, err) + _ = unmarshaled.unmarshal(marshaled) assert.Equal(t, original.offset, unmarshaled.offset) assert.Equal(t, original.size, unmarshaled.size) @@ -144,8 +143,7 @@ func Test_timestampsMetadata_marshal_unmarshal(t *testing.T) { unmarshaled := ×tampsMetadata{} - _, err := unmarshaled.unmarshal(marshaled) - require.NoError(t, err) + _ = unmarshaled.unmarshal(marshaled) assert.Equal(t, original.dataBlock.offset, unmarshaled.dataBlock.offset) assert.Equal(t, original.dataBlock.size, unmarshaled.dataBlock.size) diff --git a/banyand/stream/tag_metadata.go b/banyand/stream/tag_metadata.go index d470b6f90..8b8629f44 100644 --- a/banyand/stream/tag_metadata.go +++ b/banyand/stream/tag_metadata.go @@ -62,10 +62,7 @@ func (tm *tagMetadata) unmarshal(src []byte) ([]byte, error) { } tm.valueType = pbv1.ValueType(src[0]) src = src[1:] - src, err = tm.dataBlock.unmarshal(src) - if err != nil { - return nil, fmt.Errorf("cannot unmarshal tagMetadata.dataBlock: %w", err) - } + src = tm.dataBlock.unmarshal(src) return src, nil } @@ -109,14 +106,12 @@ func (tfm *tagFamilyMetadata) marshal(dst []byte) []byte { } func (tfm *tagFamilyMetadata) unmarshal(src []byte) error { - src, tagMetadataLen, err := encoding.BytesToVarUint64(src) - if err != nil { - return fmt.Errorf("cannot unmarshal tagMetadataLen: %w", err) - } + src, tagMetadataLen := encoding.BytesToVarUint64(src) if tagMetadataLen < 1 { return nil } tms := tfm.resizeTagMetadata(int(tagMetadataLen)) + var err error for i := range tms { src, err = tms[i].unmarshal(src) if err != nil { diff --git a/dist/LICENSE b/dist/LICENSE index 606ecf1d0..be91e4228 100644 --- a/dist/LICENSE +++ b/dist/LICENSE @@ -218,19 +218,20 @@ Apache-2.0 licenses go.etcd.io/etcd/pkg/v3 v3.5.17 Apache-2.0 go.etcd.io/etcd/raft/v3 v3.5.17 Apache-2.0 go.etcd.io/etcd/server/v3 v3.5.17 Apache-2.0 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 Apache-2.0 - go.opentelemetry.io/otel v1.32.0 Apache-2.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 Apache-2.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0 Apache-2.0 - go.opentelemetry.io/otel/metric v1.32.0 Apache-2.0 - go.opentelemetry.io/otel/sdk v1.32.0 Apache-2.0 - go.opentelemetry.io/otel/trace v1.32.0 Apache-2.0 + go.opentelemetry.io/auto/sdk v1.1.0 Apache-2.0 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 Apache-2.0 + go.opentelemetry.io/otel v1.33.0 Apache-2.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 Apache-2.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 Apache-2.0 + go.opentelemetry.io/otel/metric v1.33.0 Apache-2.0 + go.opentelemetry.io/otel/sdk v1.33.0 Apache-2.0 + go.opentelemetry.io/otel/trace v1.33.0 Apache-2.0 go.opentelemetry.io/proto/otlp v1.4.0 Apache-2.0 go.uber.org/mock v0.5.0 Apache-2.0 - google.golang.org/genproto v0.0.0-20241209162323-e6fa225c2576 Apache-2.0 - google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 Apache-2.0 - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 Apache-2.0 - google.golang.org/grpc v1.68.1 Apache-2.0 + google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb Apache-2.0 + google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb Apache-2.0 + google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb Apache-2.0 + google.golang.org/grpc v1.69.2 Apache-2.0 gopkg.in/ini.v1 v1.67.0 Apache-2.0 gopkg.in/yaml.v2 v2.4.0 Apache-2.0 skywalking.apache.org/repo/goapi v0.0.0-20241129131257-944118bb91b8 Apache-2.0 @@ -246,7 +247,7 @@ BSD-2-Clause licenses ======================================================================== github.com/gorilla/websocket v1.5.3 BSD-2-Clause - github.com/kamstrup/intmap v0.5.0 BSD-2-Clause + github.com/kamstrup/intmap v0.5.1 BSD-2-Clause github.com/magiconair/properties v1.8.9 BSD-2-Clause github.com/pkg/errors v0.9.1 BSD-2-Clause github.com/russross/blackfriday/v2 v2.1.0 BSD-2-Clause @@ -261,7 +262,7 @@ BSD-2-Clause and ISC licenses BSD-3-Clause licenses ======================================================================== - github.com/bits-and-blooms/bitset v1.19.1 BSD-3-Clause + github.com/bits-and-blooms/bitset v1.20.0 BSD-3-Clause github.com/blevesearch/mmap-go v1.0.4 BSD-3-Clause github.com/blevesearch/snowballstem v0.9.0 BSD-3-Clause github.com/fsnotify/fsnotify v1.8.0 BSD-3-Clause @@ -270,7 +271,7 @@ BSD-3-Clause licenses github.com/google/go-cmp v0.6.0 BSD-3-Clause github.com/google/uuid v1.6.0 BSD-3-Clause github.com/grpc-ecosystem/grpc-gateway v1.16.0 BSD-3-Clause - github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 BSD-3-Clause + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 BSD-3-Clause github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 BSD-3-Clause github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 BSD-3-Clause github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 BSD-3-Clause @@ -281,14 +282,14 @@ BSD-3-Clause licenses github.com/tklauser/go-sysconf v0.3.14 BSD-3-Clause github.com/xhit/go-str2duration/v2 v2.1.0 BSD-3-Clause golang.org/x/crypto v0.31.0 BSD-3-Clause - golang.org/x/exp v0.0.0-20241210194714-1829a127f884 BSD-3-Clause + golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 BSD-3-Clause golang.org/x/mod v0.22.0 BSD-3-Clause - golang.org/x/net v0.32.0 BSD-3-Clause + golang.org/x/net v0.33.0 BSD-3-Clause golang.org/x/sys v0.28.0 BSD-3-Clause golang.org/x/text v0.21.0 BSD-3-Clause golang.org/x/time v0.8.0 BSD-3-Clause golang.org/x/tools v0.28.0 BSD-3-Clause - google.golang.org/protobuf v1.35.2 BSD-3-Clause + google.golang.org/protobuf v1.36.0 BSD-3-Clause ======================================================================== BSD-3-Clause and Apache-2.0 and MIT licenses @@ -313,17 +314,17 @@ MIT licenses ======================================================================== github.com/SkyAPM/clock v1.3.1-0.20220809233656-dc7607c94a97 MIT - github.com/axiomhq/hyperloglog v0.2.1 MIT + github.com/axiomhq/hyperloglog v0.2.2 MIT github.com/beorn7/perks v1.0.1 MIT github.com/blevesearch/go-porterstemmer v1.0.3 MIT github.com/caio/go-tdigest v3.1.0+incompatible MIT github.com/cenkalti/backoff/v4 v4.3.0 MIT github.com/cespare/xxhash v1.1.0 MIT github.com/cespare/xxhash/v2 v2.3.0 MIT - github.com/cpuguy83/go-md2man/v2 v2.0.5 MIT + github.com/cpuguy83/go-md2man/v2 v2.0.6 MIT github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140 MIT github.com/dustin/go-humanize v1.0.1 MIT - github.com/go-chi/chi/v5 v5.1.0 MIT + github.com/go-chi/chi/v5 v5.2.0 MIT github.com/go-ole/go-ole v1.3.0 MIT github.com/go-resty/resty/v2 v2.16.2 MIT github.com/go-task/slim-sprig/v3 v3.0.0 MIT @@ -333,7 +334,7 @@ MIT licenses github.com/mattn/go-isatty v0.0.20 MIT github.com/mitchellh/mapstructure v1.5.0 MIT github.com/montanaflynn/stats v0.7.1 MIT - github.com/onsi/ginkgo/v2 v2.22.0 MIT + github.com/onsi/ginkgo/v2 v2.22.1 MIT github.com/onsi/gomega v1.36.1 MIT github.com/pelletier/go-toml/v2 v2.2.3 MIT github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 MIT @@ -342,7 +343,7 @@ MIT licenses github.com/sagikazarmark/locafero v0.6.0 MIT github.com/sirupsen/logrus v1.9.3 MIT github.com/sourcegraph/conc v0.3.0 MIT - github.com/spf13/cast v1.7.0 MIT + github.com/spf13/cast v1.7.1 MIT github.com/spf13/viper v1.19.0 MIT github.com/stretchr/testify v1.10.0 MIT github.com/subosito/gotenv v1.6.0 MIT @@ -459,13 +460,13 @@ MIT licenses asynckit 0.4.0 MIT axios 1.7.9 MIT braces 3.0.3 MIT - chokidar 4.0.1 MIT + chokidar 4.0.3 MIT codemirror 5.65.18 MIT combined-stream 1.0.8 MIT csstype 3.1.3 MIT dayjs 1.11.13 MIT delayed-stream 1.0.0 MIT - element-plus 2.9.0 MIT + element-plus 2.9.1 MIT escape-html 1.0.3 MIT estree-walker 2.0.2 MIT fill-range 7.1.1 MIT @@ -480,7 +481,7 @@ MIT licenses lodash 4.17.21 MIT lodash-es 4.17.21 MIT lodash-unified 1.0.3 MIT - magic-string 0.30.15 MIT + magic-string 0.30.17 MIT memoize-one 6.0.0 MIT micromatch 4.0.8 MIT mime-db 1.52.0 MIT @@ -493,7 +494,7 @@ MIT licenses postcss 8.4.49 MIT proxy-from-env 1.1.0 MIT readdirp 4.0.2 MIT - sass 1.82.0 MIT + sass 1.83.0 MIT to-regex-range 5.0.1 MIT universalify 2.0.1 MIT vue 3.5.13 MIT diff --git a/dist/licenses/license-go.opentelemetry.io-auto-sdk.txt b/dist/licenses/license-go.opentelemetry.io-auto-sdk.txt new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/dist/licenses/license-go.opentelemetry.io-auto-sdk.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/go.mod b/go.mod index 92c95d04c..a6ab4b33b 100644 --- a/go.mod +++ b/go.mod @@ -12,17 +12,17 @@ require ( github.com/cespare/xxhash v1.1.0 github.com/emirpasic/gods v1.18.1 github.com/envoyproxy/protoc-gen-validate v1.1.0 - github.com/go-chi/chi/v5 v5.1.0 + github.com/go-chi/chi/v5 v5.2.0 github.com/go-resty/resty/v2 v2.16.2 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.6.0 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.2.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 github.com/hashicorp/golang-lru v1.0.2 github.com/kkdai/maglev v0.2.0 github.com/montanaflynn/stats v0.7.1 github.com/oklog/run v1.1.0 - github.com/onsi/ginkgo/v2 v2.22.0 + github.com/onsi/ginkgo/v2 v2.22.1 github.com/onsi/gomega v1.36.1 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 @@ -38,31 +38,32 @@ require ( go.etcd.io/etcd/server/v3 v3.5.17 go.uber.org/mock v0.5.0 go.uber.org/multierr v1.11.0 - golang.org/x/exp v0.0.0-20241210194714-1829a127f884 + golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 golang.org/x/mod v0.22.0 - google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 - google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 - google.golang.org/grpc v1.68.1 - google.golang.org/protobuf v1.35.2 + google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb + google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb + google.golang.org/grpc v1.69.2 + google.golang.org/protobuf v1.36.0 sigs.k8s.io/yaml v1.4.0 skywalking.apache.org/repo/goapi v0.0.0-20241129131257-944118bb91b8 ) require ( - github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect - github.com/kamstrup/intmap v0.5.0 // indirect + github.com/kamstrup/intmap v0.5.1 // indirect github.com/machinebox/graphql v0.2.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect ) require ( - github.com/axiomhq/hyperloglog v0.2.1 // indirect + github.com/axiomhq/hyperloglog v0.2.2 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/bits-and-blooms/bitset v1.19.1 // indirect + github.com/bits-and-blooms/bitset v1.20.0 // indirect github.com/blevesearch/go-porterstemmer v1.0.3 // indirect github.com/blevesearch/mmap-go v1.0.4 // indirect github.com/blevesearch/segment v0.9.1 // indirect @@ -121,7 +122,7 @@ require ( github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.11.0 // indirect - github.com/spf13/cast v1.7.0 // indirect + github.com/spf13/cast v1.7.1 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.9.0 // indirect @@ -134,22 +135,22 @@ require ( go.etcd.io/etcd/client/v2 v2.305.17 // indirect go.etcd.io/etcd/pkg/v3 v3.5.17 // indirect go.etcd.io/etcd/raft/v3 v3.5.17 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 // indirect - go.opentelemetry.io/otel v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect - go.opentelemetry.io/otel/sdk v1.32.0 // indirect - go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 // indirect + go.opentelemetry.io/otel v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect + go.opentelemetry.io/otel/metric v1.33.0 // indirect + go.opentelemetry.io/otel/sdk v1.33.0 // indirect + go.opentelemetry.io/otel/trace v1.33.0 // indirect go.opentelemetry.io/proto/otlp v1.4.0 // indirect go.uber.org/zap v1.27.0 golang.org/x/crypto v0.31.0 // indirect - golang.org/x/net v0.32.0 // indirect + golang.org/x/net v0.33.0 // indirect golang.org/x/sys v0.28.0 golang.org/x/text v0.21.0 // indirect golang.org/x/time v0.8.0 // indirect golang.org/x/tools v0.28.0 // indirect - google.golang.org/genproto v0.0.0-20241209162323-e6fa225c2576 // indirect + google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index 4c5f07fa0..d6cbed3e7 100644 --- a/go.sum +++ b/go.sum @@ -15,15 +15,15 @@ github.com/SkyAPM/ice v0.0.0-20241108011032-c3d8eea75118/go.mod h1:DoQeb0Ee86Lyr github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/skywalking-cli v0.0.0-20240227151024-ee371a210afe h1:zIc2yfpc/vMpfTtWprCVpca6CMJwb6X9cknqAoFeEFo= github.com/apache/skywalking-cli v0.0.0-20240227151024-ee371a210afe/go.mod h1:pu6Q19Xs38FSfy/IwnJGAMilO+W58/ugM8aMfLzw+i0= -github.com/axiomhq/hyperloglog v0.2.1 h1:z+rouIlYdpZ+DVfnQigBimhQL6OKHIL3e8+hMiud5/c= -github.com/axiomhq/hyperloglog v0.2.1/go.mod h1:WCdOZ8PNJKNcBw3xFZ7iHlnUn1nDVHK/XToLjjmySh4= +github.com/axiomhq/hyperloglog v0.2.2 h1:9X9rOdYx82zXKgd1aMsDZNUw3d7DKAHhd2J305HZPA8= +github.com/axiomhq/hyperloglog v0.2.2/go.mod h1:DLUK9yIzpU5B6YFLjxTIcbHu1g4Y1WQb1m5RH3radaM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bits-and-blooms/bitset v1.12.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= -github.com/bits-and-blooms/bitset v1.19.1 h1:mv2yVhy96D2CuskLPXnc58oJNMs5PCWjAZuyYU0p12M= -github.com/bits-and-blooms/bitset v1.19.1/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= +github.com/bits-and-blooms/bitset v1.20.0 h1:2F+rfL86jE2d/bmw7OhqUg2Sj/1rURkBn3MdfoPyRVU= +github.com/bits-and-blooms/bitset v1.20.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/mmap-go v1.0.4 h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc= @@ -54,8 +54,8 @@ github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03V github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= -github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= +github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= @@ -83,8 +83,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= -github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0= +github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -153,8 +153,8 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ= github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= @@ -165,8 +165,8 @@ github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/kamstrup/intmap v0.5.0 h1:WY7OJQeG7Ujc9zpPTO6PraDGSveG9js9wCPoI2q8wJQ= -github.com/kamstrup/intmap v0.5.0/go.mod h1:gWUVWHKzWj8xpJVFf5GC0O26bWmv3GqdnIX/LMT6Aq4= +github.com/kamstrup/intmap v0.5.1 h1:ENGAowczZA+PJPYYlreoqJvWgQVtAmX1l899WfYFVK0= +github.com/kamstrup/intmap v0.5.1/go.mod h1:gWUVWHKzWj8xpJVFf5GC0O26bWmv3GqdnIX/LMT6Aq4= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/maglev v0.2.0 h1:w6DCW0kAA6fstZqXkrBrlgIC3jeIRXkjOYea/m6EK/Y= @@ -214,8 +214,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= -github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= +github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM= +github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -271,8 +271,8 @@ github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0b github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= -github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w= -github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= +github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y= +github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -330,20 +330,24 @@ go.etcd.io/etcd/raft/v3 v3.5.17 h1:wHPW/b1oFBw/+HjDAQ9vfr17OIInejTIsmwMZpK1dNo= go.etcd.io/etcd/raft/v3 v3.5.17/go.mod h1:uapEfOMPaJ45CqBYIraLO5+fqyIY2d57nFfxzFwy4D4= go.etcd.io/etcd/server/v3 v3.5.17 h1:xykBwLZk9IdDsB8z8rMdCCPRvhrG+fwvARaGA0TRiyc= go.etcd.io/etcd/server/v3 v3.5.17/go.mod h1:40sqgtGt6ZJNKm8nk8x6LexZakPu+NDl/DCgZTZ69Cc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0 h1:qtFISDHKolvIxzSs0gIaiPUPR0Cucb0F2coHC7ZLdps= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.57.0/go.mod h1:Y+Pop1Q6hCOnETWTW4NROK/q1hv50hM7yDaUTjG8lp8= -go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= -go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0 h1:IJFEoHiytixx8cMiVAO+GmHR6Frwu+u5Ur8njpFO6Ac= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.32.0/go.mod h1:3rHrKNtLIoS0oZwkY2vxi+oJcwFRWdtUyRII+so45p8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0 h1:9kV11HXBHZAvuPUZxmMWrH8hZn/6UnHX4K0mu36vNsU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.32.0/go.mod h1:JyA0FHXe22E1NeNiHmVp7kFHglnexDQ7uRWDiiJ1hKQ= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= -go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= -go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= -go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= -go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0/go.mod h1:HDBUsEjOuRC0EzKZ1bSaRGZWUBAzo+MhAcUUORSr4D0= +go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= +go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 h1:5pojmb1U1AogINhN3SurB+zm/nIcusopeBNp42f45QM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0/go.mod h1:57gTHJSE5S1tqg+EKsLPlTWhpHMsWlVmer+LA926XiA= +go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= +go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= +go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= +go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= +go.opentelemetry.io/otel/sdk/metric v1.31.0 h1:i9hxxLJF/9kkvfHppyLL55aW7iIJz4JjxTeYusH7zMc= +go.opentelemetry.io/otel/sdk/metric v1.31.0/go.mod h1:CRInTMVvNhUKgSAMbKyTMxqOBC0zgyxzW55lZzX43Y8= +go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= +go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= @@ -367,8 +371,8 @@ golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1m golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U= golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20241210194714-1829a127f884 h1:Y/Mj/94zIQQGHVSv1tTtQBDaQaJe62U9bkDZKKyhPCU= -golang.org/x/exp v0.0.0-20241210194714-1829a127f884/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= +golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo= +golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -400,8 +404,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= -golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= +golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I= +golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -488,12 +492,12 @@ google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20241209162323-e6fa225c2576 h1:k48HcZ4FE6in0o8IflZCkc1lTc2u37nhGd8P+fo4r24= -google.golang.org/genproto v0.0.0-20241209162323-e6fa225c2576/go.mod h1:DV2u3tCn/AcVjjmGYZKt6HyvY4w4y3ipAdHkMbe/0i4= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= -google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb h1:JGs+s1Q6osip3cDY197L1HmkuPn8wPp9Hfy9jl+Uz+U= +google.golang.org/genproto v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:o8GgNarfULyZPNaIY8RDfXM7AZcmcKC/tbMWp/ZOFDw= +google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb h1:B7GIB7sr443wZ/EAEl7VZjmh1V6qzkt5V+RYcUYtS1U= +google.golang.org/genproto/googleapis/api v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:E5//3O5ZIG2l71Xnt+P/CYUY8Bxs8E7WMoZ9tlcMbAY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb h1:3oy2tynMOP1QbTC0MsNNAV+Se8M2Bd0A5+x1QHyw+pI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= @@ -503,8 +507,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= -google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= +google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU= +google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -517,8 +521,8 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= -google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ= +google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/pkg/encoding/bytes.go b/pkg/encoding/bytes.go index 25ece6fa3..14a02c7c0 100644 --- a/pkg/encoding/bytes.go +++ b/pkg/encoding/bytes.go @@ -33,11 +33,8 @@ func EncodeBytes(dst, b []byte) []byte { // DecodeBytes decodes a string from src. func DecodeBytes(src []byte) ([]byte, []byte, error) { - tail, n, err := BytesToVarUint64(src) - if err != nil { - return nil, nil, fmt.Errorf("cannot decode string size: %w", err) - } - src = tail + var n uint64 + src, n = BytesToVarUint64(src) if uint64(len(src)) < n { return nil, nil, fmt.Errorf("src is too short for reading string with size %d; len(src)=%d", n, len(src)) } @@ -270,10 +267,7 @@ func decompressBlock(dst, src []byte) ([]byte, []byte, error) { src = src[blockLen:] return dst, src, nil case compressTypeZSTD: - tail, blockLen, err := BytesToVarUint64(src) - if err != nil { - return dst, src, fmt.Errorf("cannot decode compressed block size: %w", err) - } + tail, blockLen := BytesToVarUint64(src) src = tail if uint64(len(src)) < blockLen { return dst, src, fmt.Errorf("cannot read compressed block with the size %d bytes from %d bytes", blockLen, len(src)) @@ -282,6 +276,7 @@ func decompressBlock(dst, src []byte) ([]byte, []byte, error) { src = src[blockLen:] // Decompress the block + var err error bb := bbPool.Generate() bb.Buf, err = zstd.Decompress(bb.Buf[:0], compressedBlock) if err != nil { diff --git a/pkg/encoding/int.go b/pkg/encoding/int.go index 05a227ab2..d25a3a769 100644 --- a/pkg/encoding/int.go +++ b/pkg/encoding/int.go @@ -150,6 +150,16 @@ func BytesToVarInt64List(dst []int64, src []byte) ([]byte, error) { // VarUint64ToBytes appends the bytes of the given uint64 to the given byte slice. // It uses variable-length encoding. func VarUint64ToBytes(dst []byte, u uint64) []byte { + if u < (1 << 7) { + return append(dst, byte(u)) + } + if u < (1 << (2 * 7)) { + return append(dst, byte(u|0x80), byte(u>>7)) + } + if u < (1 << (3 * 7)) { + return append(dst, byte(u|0x80), byte((u>>7)|0x80), byte(u>>(2*7))) + } + var tmp [1]uint64 tmp[0] = u return VarUint64sToBytes(dst, tmp[:]) @@ -174,10 +184,28 @@ func VarUint64sToBytes(dst []byte, us []uint64) []byte { // BytesToVarUint64 converts the first bytes of the given byte slice to a uint64. // It uses variable-length encoding. -func BytesToVarUint64(src []byte) ([]byte, uint64, error) { - var tmp [1]uint64 - tail, err := BytesToVarUint64s(tmp[:], src) - return tail, tmp[0], err +func BytesToVarUint64(src []byte) ([]byte, uint64) { + if len(src) == 0 { + return src, 0 + } + if src[0] < 0x80 { + // Fast path for a single byte + return src[1:], uint64(src[0]) + } + if len(src) == 1 { + return src, 0 + } + if src[1] < 0x80 { + // Fast path for two bytes + return src[2:], uint64(src[0]&0x7f) | uint64(src[1])<<7 + } + + // Slow path for other number of bytes + x, o := binary.Uvarint(src) + if o <= 0 { + return src, 0 + } + return src[o:], x } // BytesToVarUint64s converts the first bytes of the given byte slice to a uint64s. diff --git a/pkg/index/index.go b/pkg/index/index.go index 855e48281..6538558ba 100644 --- a/pkg/index/index.go +++ b/pkg/index/index.go @@ -48,6 +48,10 @@ const ( AnalyzerStandard = "standard" // AnalyzerURL breaks test into tokens at any non-letter and non-digit character. AnalyzerURL = "url" + // IndexModeName is the name in the index mode. + IndexModeName = "_im_name" + // IndexModeEntityTagPrefix is the entity tag prefix in the index mode. + IndexModeEntityTagPrefix = "_im_entity_tag_" ) var ( diff --git a/pkg/index/inverted/query.go b/pkg/index/inverted/query.go index 2dc630930..d15b4485b 100644 --- a/pkg/index/inverted/query.go +++ b/pkg/index/inverted/query.go @@ -62,8 +62,8 @@ func (q *queryNode) String() string { return q.node.String() } -// BuildLocalQuery returns blugeQuery for local indices. -func BuildLocalQuery(criteria *modelv1.Criteria, schema logical.Schema, entityDict map[string]int, +// BuildQuery returns blugeQuery for local indices. +func BuildQuery(criteria *modelv1.Criteria, schema logical.Schema, entityDict map[string]int, entity []*modelv1.TagValue, ) (index.Query, [][]*modelv1.TagValue, bool, error) { if criteria == nil { @@ -80,7 +80,12 @@ func BuildLocalQuery(criteria *modelv1.Criteria, schema logical.Schema, entityDi return nil, parsedEntity, false, nil } if ok, indexRule := schema.IndexDefined(cond.Name); ok { - return parseConditionToQuery(cond, indexRule, expr, entity) + fk := index.FieldKey{IndexRuleID: indexRule.Metadata.Id} + q, err := parseConditionToQuery(cond, indexRule, expr, fk.Marshal()) + if err != nil { + return nil, nil, false, err + } + return q, [][]*modelv1.TagValue{entity}, false, nil } return nil, nil, false, errors.Wrapf(logical.ErrUnsupportedConditionOp, "mandatory index rule conf:%s", cond) case *modelv1.Criteria_Le: @@ -89,16 +94,16 @@ func BuildLocalQuery(criteria *modelv1.Criteria, schema logical.Schema, entityDi return nil, nil, false, errors.WithMessagef(logical.ErrInvalidLogicalExpression, "both sides(left and right) of [%v] are empty", criteria) } if le.GetLeft() == nil { - return BuildLocalQuery(le.Right, schema, entityDict, entity) + return BuildQuery(le.Right, schema, entityDict, entity) } if le.GetRight() == nil { - return BuildLocalQuery(le.Left, schema, entityDict, entity) + return BuildQuery(le.Left, schema, entityDict, entity) } - left, leftEntities, leftIsMatchAllQuery, err := BuildLocalQuery(le.Left, schema, entityDict, entity) + left, leftEntities, leftIsMatchAllQuery, err := BuildQuery(le.Left, schema, entityDict, entity) if err != nil { return nil, nil, false, err } - right, rightEntities, rightIsMatchAllQuery, err := BuildLocalQuery(le.Right, schema, entityDict, entity) + right, rightEntities, rightIsMatchAllQuery, err := BuildQuery(le.Right, schema, entityDict, entity) if err != nil { return nil, nil, false, err } @@ -146,68 +151,188 @@ func BuildLocalQuery(criteria *modelv1.Criteria, schema logical.Schema, entityDi } return &queryNode{query, node}, entities, false, nil } + return nil, nil, false, logical.ErrInvalidCriteriaType } return nil, nil, false, logical.ErrInvalidCriteriaType } -func parseConditionToQuery(cond *modelv1.Condition, indexRule *databasev1.IndexRule, - expr logical.LiteralExpr, entity []*modelv1.TagValue, -) (*queryNode, [][]*modelv1.TagValue, bool, error) { - field := string(convert.Uint32ToBytes(indexRule.Metadata.Id)) - b := expr.Bytes() - if len(b) < 1 { +// BuildIndexModeQuery returns blugeQuery for index mode. +func BuildIndexModeQuery(measureName string, timeRange *timestamp.TimeRange, criteria *modelv1.Criteria, schema logical.Schema) (index.Query, error) { + subjectQuery := bluge.NewTermQuery(measureName).SetField(index.IndexModeName) + subjectNode := newTermNode(measureName, nil) + if criteria == nil { return &queryNode{ - query: bluge.NewMatchAllQuery(), - node: newMatchAllNode(), - }, [][]*modelv1.TagValue{entity}, true, nil + query: subjectQuery, + node: subjectNode, + }, nil + } + entityList := schema.EntityList() + entityDict := make(map[string]int) + for idx, e := range entityList { + entityDict[e] = idx + } + criteriaQuery, err := buildIndexModeCriteria(criteria, schema, entityDict) + if err != nil { + return nil, err + } + query, node := bluge.NewBooleanQuery(), newMustNode() + query.AddMust(subjectQuery) + query.AddMust(criteriaQuery.(*queryNode).query) + node.Append(subjectNode) + node.Append(criteriaQuery.(*queryNode).node) + if timeRange != nil { + q := bluge.NewDateRangeInclusiveQuery(timeRange.Start, timeRange.End, timeRange.IncludeStart, timeRange.IncludeEnd) + q.SetField(timestampField) + query.AddMust(q) + node.Append(newTimeRangeNode(timeRange)) + } + return &queryNode{query, node}, nil +} + +func buildIndexModeCriteria(criteria *modelv1.Criteria, schema logical.Schema, entityDict map[string]int) (index.Query, error) { + switch criteria.GetExp().(type) { + case *modelv1.Criteria_Condition: + cond := criteria.GetCondition() + expr, err := logical.ParseExpr(cond) + if err != nil { + return nil, err + } + if _, ok := entityDict[cond.Name]; ok { + fk := index.FieldKey{TagName: index.IndexModeEntityTagPrefix + cond.Name} + return parseConditionToQuery(cond, nil, expr, fk.Marshal()) + } + if ok, indexRule := schema.IndexDefined(cond.Name); ok { + fk := index.FieldKey{IndexRuleID: indexRule.Metadata.Id} + return parseConditionToQuery(cond, indexRule, expr, fk.Marshal()) + } + return nil, errors.Wrapf(logical.ErrUnsupportedConditionOp, "mandatory index rule conf:%s", cond) + case *modelv1.Criteria_Le: + le := criteria.GetLe() + if le.GetLeft() == nil && le.GetRight() == nil { + return nil, errors.WithMessagef(logical.ErrInvalidLogicalExpression, "both sides(left and right) of [%v] are empty", criteria) + } + if le.GetLeft() == nil { + return buildIndexModeCriteria(le.Right, schema, entityDict) + } + if le.GetRight() == nil { + return buildIndexModeCriteria(le.Left, schema, entityDict) + } + left, err := buildIndexModeCriteria(le.Left, schema, entityDict) + if err != nil { + return nil, err + } + right, err := buildIndexModeCriteria(le.Right, schema, entityDict) + if err != nil { + return nil, err + } + switch le.Op { + case modelv1.LogicalExpression_LOGICAL_OP_AND: + query, node := bluge.NewBooleanQuery(), newMustNode() + if left != nil { + query.AddMust(left.(*queryNode).query) + node.Append(left.(*queryNode).node) + } + if right != nil { + query.AddMust(right.(*queryNode).query) + node.Append(right.(*queryNode).node) + } + return &queryNode{query, node}, nil + case modelv1.LogicalExpression_LOGICAL_OP_OR: + query, node := bluge.NewBooleanQuery(), newShouldNode() + query.SetMinShould(1) + if left != nil { + query.AddShould(left.(*queryNode).query) + node.Append(left.(*queryNode).node) + } + if right != nil { + query.AddShould(right.(*queryNode).query) + node.Append(right.(*queryNode).node) + } + return &queryNode{query, node}, nil + } + return nil, logical.ErrInvalidCriteriaType } - term, str := string(b[0]), expr.String() + return nil, logical.ErrInvalidCriteriaType +} + +func parseConditionToQuery(cond *modelv1.Condition, indexRule *databasev1.IndexRule, + expr logical.LiteralExpr, fieldKey string, +) (*queryNode, error) { + str := expr.String() switch cond.Op { case modelv1.Condition_BINARY_OP_GT: - query := bluge.NewTermRangeInclusiveQuery(term, maxTerm, false, false).SetField(field) + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } + query := bluge.NewTermRangeInclusiveQuery(convert.BytesToString(bb[0]), maxTerm, false, false).SetField(fieldKey) node := newTermRangeInclusiveNode(str, maxInf, false, false, indexRule) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_GE: - query := bluge.NewTermRangeInclusiveQuery(term, maxTerm, true, false).SetField(field) + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } + query := bluge.NewTermRangeInclusiveQuery(convert.BytesToString(bb[0]), maxTerm, true, false).SetField(fieldKey) node := newTermRangeInclusiveNode(str, maxInf, true, false, indexRule) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_LT: - query := bluge.NewTermRangeInclusiveQuery(minTerm, term, false, false).SetField(field) + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } + query := bluge.NewTermRangeInclusiveQuery(minTerm, convert.BytesToString(bb[0]), false, false).SetField(fieldKey) node := newTermRangeInclusiveNode(minInf, str, false, false, indexRule) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_LE: - query := bluge.NewTermRangeInclusiveQuery(minTerm, term, false, true).SetField(field) + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } + query := bluge.NewTermRangeInclusiveQuery(minTerm, convert.BytesToString(bb[0]), false, true).SetField(fieldKey) node := newTermRangeInclusiveNode(minInf, str, false, true, indexRule) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_EQ: - query := bluge.NewTermQuery(term).SetField(field) + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } + query := bluge.NewTermQuery(convert.BytesToString(bb[0])).SetField(fieldKey) node := newTermNode(str, indexRule) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_MATCH: + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } analyzer, operator := getMatchOptions(indexRule.Analyzer, cond.MatchOption) - query := bluge.NewMatchQuery(term).SetField(field).SetAnalyzer(analyzer).SetOperator(operator) + query := bluge.NewMatchQuery(convert.BytesToString(bb[0])).SetField(fieldKey).SetAnalyzer(analyzer).SetOperator(operator) node := newMatchNode(str, indexRule) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_NE: + bb := expr.Bytes() + if len(bb) != 1 { + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "don't support multiple or null value: %s", cond) + } query, node := bluge.NewBooleanQuery(), newMustNotNode() - query.AddMustNot(bluge.NewTermQuery(term).SetField(field)) + query.AddMustNot(bluge.NewTermQuery(convert.BytesToString(bb[0])).SetField(fieldKey)) node.SetSubNode(newTermNode(str, indexRule)) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_HAVING: bb, elements := expr.Bytes(), expr.Elements() query, node := bluge.NewBooleanQuery(), newMustNode() for _, b := range bb { - query.AddMust(bluge.NewTermQuery(string(b)).SetField(field)) + query.AddMust(bluge.NewTermQuery(string(b)).SetField(fieldKey)) } for _, e := range elements { node.Append(newTermNode(e, indexRule)) } - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_NOT_HAVING: bb, elements := expr.Bytes(), expr.Elements() subQuery, subNode := bluge.NewBooleanQuery(), newMustNode() for _, b := range bb { - subQuery.AddMust(bluge.NewTermQuery(string(b)).SetField(field)) + subQuery.AddMust(bluge.NewTermQuery(string(b)).SetField(fieldKey)) } for _, e := range elements { subNode.Append(newTermNode(e, indexRule)) @@ -215,24 +340,24 @@ func parseConditionToQuery(cond *modelv1.Condition, indexRule *databasev1.IndexR query, node := bluge.NewBooleanQuery(), newMustNotNode() query.AddMustNot(subQuery) node.SetSubNode(node) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_IN: bb, elements := expr.Bytes(), expr.Elements() query, node := bluge.NewBooleanQuery(), newShouldNode() query.SetMinShould(1) for _, b := range bb { - query.AddShould(bluge.NewTermQuery(string(b)).SetField(field)) + query.AddShould(bluge.NewTermQuery(string(b)).SetField(fieldKey)) } for _, e := range elements { node.Append(newTermNode(e, indexRule)) } - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil case modelv1.Condition_BINARY_OP_NOT_IN: bb, elements := expr.Bytes(), expr.Elements() subQuery, subNode := bluge.NewBooleanQuery(), newShouldNode() subQuery.SetMinShould(1) for _, b := range bb { - subQuery.AddShould(bluge.NewTermQuery(string(b)).SetField(field)) + subQuery.AddShould(bluge.NewTermQuery(string(b)).SetField(fieldKey)) } for _, e := range elements { subNode.Append(newTermNode(e, indexRule)) @@ -240,9 +365,9 @@ func parseConditionToQuery(cond *modelv1.Condition, indexRule *databasev1.IndexR query, node := bluge.NewBooleanQuery(), newMustNotNode() query.AddMustNot(subQuery) node.SetSubNode(subNode) - return &queryNode{query, node}, [][]*modelv1.TagValue{entity}, false, nil + return &queryNode{query, node}, nil } - return nil, nil, false, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "index filter parses %v", cond) + return nil, errors.WithMessagef(logical.ErrUnsupportedConditionOp, "index filter parses %v", cond) } type node interface { diff --git a/pkg/query/logical/measure/measure_plan_indexscan_local.go b/pkg/query/logical/measure/measure_plan_indexscan_local.go index 4e2745f87..1922b3bd9 100644 --- a/pkg/query/logical/measure/measure_plan_indexscan_local.go +++ b/pkg/query/logical/measure/measure_plan_indexscan_local.go @@ -80,6 +80,28 @@ func (uis *unresolvedIndexScan) Analyze(s logical.Schema) (logical.Plan, error) } } + tr := timestamp.NewInclusiveTimeRange(uis.startTime, uis.endTime) + ms := s.(*schema) + if ms.measure.IndexMode { + query, err := inverted.BuildIndexModeQuery(uis.metadata.Name, &tr, uis.criteria, s) + if err != nil { + return nil, err + } + return &localIndexScan{ + timeRange: tr, + schema: s, + projectionTags: projTags, + projectionFields: projField, + projectionTagsRefs: projTagsRefs, + projectionFieldsRefs: projFieldRefs, + metadata: uis.metadata, + query: query, + groupByEntity: uis.groupByEntity, + uis: uis, + l: logger.GetLogger("query", "measure", uis.metadata.Group, uis.metadata.Name, "local-index"), + }, nil + } + entityList := s.EntityList() entityMap := make(map[string]int) entity := make([]*modelv1.TagValue, len(entityList)) @@ -88,13 +110,13 @@ func (uis *unresolvedIndexScan) Analyze(s logical.Schema) (logical.Plan, error) // fill AnyEntry by default entity[idx] = pbv1.AnyTagValue } - query, entities, _, err := inverted.BuildLocalQuery(uis.criteria, s, entityMap, entity) + query, entities, _, err := inverted.BuildQuery(uis.criteria, s, entityMap, entity) if err != nil { return nil, err } return &localIndexScan{ - timeRange: timestamp.NewInclusiveTimeRange(uis.startTime, uis.endTime), + timeRange: tr, schema: s, projectionTags: projTags, projectionFields: projField, diff --git a/pkg/query/logical/parser.go b/pkg/query/logical/parser.go index b4769e8cb..1766b7e16 100644 --- a/pkg/query/logical/parser.go +++ b/pkg/query/logical/parser.go @@ -89,6 +89,23 @@ func ParseExprOrEntity(entityDict map[string]int, entity []*modelv1.TagValue, co return nil, nil, errors.WithMessagef(ErrUnsupportedConditionValue, "index filter parses %v", cond) } +// ParseExpr parses the condition and returns the literal expression. +func ParseExpr(cond *modelv1.Condition) (LiteralExpr, error) { + switch v := cond.Value.Value.(type) { + case *modelv1.TagValue_Str: + return str(v.Str.GetValue()), nil + case *modelv1.TagValue_StrArray: + return newStrArrLiteral(v.StrArray.GetValue()), nil + case *modelv1.TagValue_Int: + return newInt64Literal(v.Int.GetValue()), nil + case *modelv1.TagValue_IntArray: + return newInt64ArrLiteral(v.IntArray.GetValue()), nil + case *modelv1.TagValue_Null: + return newNullLiteral(), nil + } + return nil, errors.WithMessagef(ErrUnsupportedConditionValue, "condition parses %v", cond) +} + // ParseEntities merges entities based on the logical operation. func ParseEntities(op modelv1.LogicalExpression_LogicalOp, input []*modelv1.TagValue, left, right [][]*modelv1.TagValue) [][]*modelv1.TagValue { count := len(input) diff --git a/scripts/build/version.mk b/scripts/build/version.mk index d157b6ed2..21cec9590 100644 --- a/scripts/build/version.mk +++ b/scripts/build/version.mk @@ -29,6 +29,6 @@ LICENSE_EYE_VERSION := 3ea9df11bb3a5a85665377d1fd10c02edecf2c40 MOCKGEN_VERSION := v0.4.0 -GINKGO_VERSION := v2.22.0 +GINKGO_VERSION := v2.22.1 GOVULNCHECK_VERSION := v1.1.3 diff --git a/test/cases/measure/data/input/index_mode_by_id.yaml b/test/cases/measure/data/input/index_mode_by_id.yaml new file mode 100644 index 000000000..3756f5571 --- /dev/null +++ b/test/cases/measure/data/input/index_mode_by_id.yaml @@ -0,0 +1,30 @@ +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: "service_traffic" +groups: [ "index_mode" ] +tagProjection: + tagFamilies: + - name: "default" + tags: [ "id", "service_id", "name", "layer" ] +criteria: + condition: + name: "id" + op: "BINARY_OP_EQ" + value: + str: + value: "1" diff --git a/test/cases/measure/data/want/index_mode_by_id.yaml b/test/cases/measure/data/want/index_mode_by_id.yaml new file mode 100644 index 000000000..93c1cadb1 --- /dev/null +++ b/test/cases/measure/data/want/index_mode_by_id.yaml @@ -0,0 +1,39 @@ +# Licensed to Apache Software Foundation (ASF) under one or more contributor +# license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright +# ownership. Apache Software Foundation (ASF) licenses this file to you under +# the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +dataPoints: +- sid: "15142466043926325685" + tagFamilies: + - name: default + tags: + - key: id + value: + str: + value: "1" + - key: service_id + value: + str: + value: service_1 + - key: name + value: + str: + value: service_name_1 + - key: layer + value: + int: + value: "1" + timestamp: "2024-12-20T08:18:00Z" + version: "1734682856418140000" diff --git a/test/cases/measure/measure.go b/test/cases/measure/measure.go index 39bd2bf3d..5a5b23cae 100644 --- a/test/cases/measure/measure.go +++ b/test/cases/measure/measure.go @@ -77,4 +77,5 @@ var _ = g.DescribeTable("Scanning Measures", verify, g.Entry("order by desc of index mode", helpers.Args{Input: "index_mode_order_desc", Duration: 25 * time.Minute, Offset: -20 * time.Minute}), g.Entry("range of index mode", helpers.Args{Input: "index_mode_range", Duration: 25 * time.Minute, Offset: -20 * time.Minute}), g.Entry("none of index mode", helpers.Args{Input: "index_mode_none", WantEmpty: true, Duration: 25 * time.Minute, Offset: -20 * time.Minute}), + g.Entry("query by id in index mode", helpers.Args{Input: "index_mode_by_id", Duration: 25 * time.Minute, Offset: -20 * time.Minute}), ) diff --git a/ui/LICENSE b/ui/LICENSE index d9869ecaa..604f19597 100644 --- a/ui/LICENSE +++ b/ui/LICENSE @@ -80,13 +80,13 @@ MIT licenses asynckit 0.4.0 MIT axios 1.7.9 MIT braces 3.0.3 MIT - chokidar 4.0.1 MIT + chokidar 4.0.3 MIT codemirror 5.65.18 MIT combined-stream 1.0.8 MIT csstype 3.1.3 MIT dayjs 1.11.13 MIT delayed-stream 1.0.0 MIT - element-plus 2.9.0 MIT + element-plus 2.9.1 MIT escape-html 1.0.3 MIT estree-walker 2.0.2 MIT fill-range 7.1.1 MIT @@ -101,7 +101,7 @@ MIT licenses lodash 4.17.21 MIT lodash-es 4.17.21 MIT lodash-unified 1.0.3 MIT - magic-string 0.30.15 MIT + magic-string 0.30.17 MIT memoize-one 6.0.0 MIT micromatch 4.0.8 MIT mime-db 1.52.0 MIT @@ -114,7 +114,7 @@ MIT licenses postcss 8.4.49 MIT proxy-from-env 1.1.0 MIT readdirp 4.0.2 MIT - sass 1.82.0 MIT + sass 1.83.0 MIT to-regex-range 5.0.1 MIT universalify 2.0.1 MIT vue 3.5.13 MIT diff --git a/ui/package-lock.json b/ui/package-lock.json index 1f7135eed..f5bc44a13 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -876,9 +876,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz", - "integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", + "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==", "dev": true, "license": "MIT", "dependencies": { @@ -912,9 +912,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz", - "integrity": "sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.29.1.tgz", + "integrity": "sha512-ssKhA8RNltTZLpG6/QNkCSge+7mBQGUqJRisZ2MDQcEGaK93QESEgWK2iOpIDZ7k9zPVkG5AS3ksvD5ZWxmItw==", "cpu": [ "arm" ], @@ -926,9 +926,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz", - "integrity": "sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.29.1.tgz", + "integrity": "sha512-CaRfrV0cd+NIIcVVN/jx+hVLN+VRqnuzLRmfmlzpOzB87ajixsN/+9L5xNmkaUUvEbI5BmIKS+XTwXsHEb65Ew==", "cpu": [ "arm64" ], @@ -940,9 +940,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz", - "integrity": "sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.29.1.tgz", + "integrity": "sha512-2ORr7T31Y0Mnk6qNuwtyNmy14MunTAMx06VAPI6/Ju52W10zk1i7i5U3vlDRWjhOI5quBcrvhkCHyF76bI7kEw==", "cpu": [ "arm64" ], @@ -954,9 +954,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz", - "integrity": "sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.29.1.tgz", + "integrity": "sha512-j/Ej1oanzPjmN0tirRd5K2/nncAhS9W6ICzgxV+9Y5ZsP0hiGhHJXZ2JQ53iSSjj8m6cRY6oB1GMzNn2EUt6Ng==", "cpu": [ "x64" ], @@ -968,9 +968,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz", - "integrity": "sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.29.1.tgz", + "integrity": "sha512-91C//G6Dm/cv724tpt7nTyP+JdN12iqeXGFM1SqnljCmi5yTXriH7B1r8AD9dAZByHpKAumqP1Qy2vVNIdLZqw==", "cpu": [ "arm64" ], @@ -982,9 +982,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz", - "integrity": "sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.29.1.tgz", + "integrity": "sha512-hEioiEQ9Dec2nIRoeHUP6hr1PSkXzQaCUyqBDQ9I9ik4gCXQZjJMIVzoNLBRGet+hIUb3CISMh9KXuCcWVW/8w==", "cpu": [ "x64" ], @@ -996,9 +996,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz", - "integrity": "sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.29.1.tgz", + "integrity": "sha512-Py5vFd5HWYN9zxBv3WMrLAXY3yYJ6Q/aVERoeUFwiDGiMOWsMs7FokXihSOaT/PMWUty/Pj60XDQndK3eAfE6A==", "cpu": [ "arm" ], @@ -1010,9 +1010,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz", - "integrity": "sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.29.1.tgz", + "integrity": "sha512-RiWpGgbayf7LUcuSNIbahr0ys2YnEERD4gYdISA06wa0i8RALrnzflh9Wxii7zQJEB2/Eh74dX4y/sHKLWp5uQ==", "cpu": [ "arm" ], @@ -1024,9 +1024,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz", - "integrity": "sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.29.1.tgz", + "integrity": "sha512-Z80O+taYxTQITWMjm/YqNoe9d10OX6kDh8X5/rFCMuPqsKsSyDilvfg+vd3iXIqtfmp+cnfL1UrYirkaF8SBZA==", "cpu": [ "arm64" ], @@ -1038,9 +1038,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz", - "integrity": "sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.29.1.tgz", + "integrity": "sha512-fOHRtF9gahwJk3QVp01a/GqS4hBEZCV1oKglVVq13kcK3NeVlS4BwIFzOHDbmKzt3i0OuHG4zfRP0YoG5OF/rA==", "cpu": [ "arm64" ], @@ -1052,9 +1052,9 @@ ] }, "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz", - "integrity": "sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.29.1.tgz", + "integrity": "sha512-5a7q3tnlbcg0OodyxcAdrrCxFi0DgXJSoOuidFUzHZ2GixZXQs6Tc3CHmlvqKAmOs5eRde+JJxeIf9DonkmYkw==", "cpu": [ "loong64" ], @@ -1066,9 +1066,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz", - "integrity": "sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.29.1.tgz", + "integrity": "sha512-9b4Mg5Yfz6mRnlSPIdROcfw1BU22FQxmfjlp/CShWwO3LilKQuMISMTtAu/bxmmrE6A902W2cZJuzx8+gJ8e9w==", "cpu": [ "ppc64" ], @@ -1080,9 +1080,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz", - "integrity": "sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.29.1.tgz", + "integrity": "sha512-G5pn0NChlbRM8OJWpJFMX4/i8OEU538uiSv0P6roZcbpe/WfhEO+AT8SHVKfp8qhDQzaz7Q+1/ixMy7hBRidnQ==", "cpu": [ "riscv64" ], @@ -1094,9 +1094,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz", - "integrity": "sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.29.1.tgz", + "integrity": "sha512-WM9lIkNdkhVwiArmLxFXpWndFGuOka4oJOZh8EP3Vb8q5lzdSCBuhjavJsw68Q9AKDGeOOIHYzYm4ZFvmWez5g==", "cpu": [ "s390x" ], @@ -1108,9 +1108,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz", - "integrity": "sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.29.1.tgz", + "integrity": "sha512-87xYCwb0cPGZFoGiErT1eDcssByaLX4fc0z2nRM6eMtV9njAfEE6OW3UniAoDhX4Iq5xQVpE6qO9aJbCFumKYQ==", "cpu": [ "x64" ], @@ -1122,9 +1122,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz", - "integrity": "sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.29.1.tgz", + "integrity": "sha512-xufkSNppNOdVRCEC4WKvlR1FBDyqCSCpQeMMgv9ZyXqqtKBfkw1yfGMTUTs9Qsl6WQbJnsGboWCp7pJGkeMhKA==", "cpu": [ "x64" ], @@ -1136,9 +1136,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz", - "integrity": "sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.29.1.tgz", + "integrity": "sha512-F2OiJ42m77lSkizZQLuC+jiZ2cgueWQL5YC9tjo3AgaEw+KJmVxHGSyQfDUoYR9cci0lAywv2Clmckzulcq6ig==", "cpu": [ "arm64" ], @@ -1150,9 +1150,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz", - "integrity": "sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.29.1.tgz", + "integrity": "sha512-rYRe5S0FcjlOBZQHgbTKNrqxCBUmgDJem/VQTCcTnA2KCabYSWQDrytOzX7avb79cAAweNmMUb/Zw18RNd4mng==", "cpu": [ "ia32" ], @@ -1164,9 +1164,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz", - "integrity": "sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.29.1.tgz", + "integrity": "sha512-+10CMg9vt1MoHj6x1pxyjPSMjHTIlqs8/tBztXvPAx24SKs9jwVnKqHJumlH/IzhaPUaj3T6T6wfZr8okdXaIg==", "cpu": [ "x64" ], @@ -1461,9 +1461,9 @@ } }, "node_modules/chokidar": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", - "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "license": "MIT", "dependencies": { "readdirp": "^4.0.1" @@ -1563,9 +1563,9 @@ } }, "node_modules/element-plus": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.9.0.tgz", - "integrity": "sha512-ccOFXKsauo2dtokAr4OX7gZsb7TuAoVxA2zGRZo5o2yyDDBLBaZxOoFQPoxITSLcHbBfQuNDGK5Iag5hnyKkZA==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.9.1.tgz", + "integrity": "sha512-9Agqf/jt4Ugk7EZ6C5LME71sgkvauPCsnvJN12Xid2XVobjufxMGpRE4L7pS4luJMOmFAH3J0NgYEGZT5r+NDg==", "license": "MIT", "dependencies": { "@ctrl/tinycolor": "^3.4.1", @@ -1816,9 +1816,9 @@ } }, "node_modules/is-core-module": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", - "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", + "version": "2.16.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.0.tgz", + "integrity": "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==", "dev": true, "license": "MIT", "dependencies": { @@ -1936,9 +1936,9 @@ } }, "node_modules/magic-string": { - "version": "0.30.15", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.15.tgz", - "integrity": "sha512-zXeaYRgZ6ldS1RJJUrMrYgNJ4fdwnyI6tVqoiIhyCyv5IVTK9BU8Ic2l253GGETQHxI4HNUwhJ3fjDhKqEoaAw==", + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", "license": "MIT", "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.0" @@ -2178,6 +2178,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -2229,19 +2230,22 @@ } }, "node_modules/resolve": { - "version": "1.22.8", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", - "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "version": "1.22.10", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz", + "integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==", "dev": true, "license": "MIT", "dependencies": { - "is-core-module": "^2.13.0", + "is-core-module": "^2.16.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, "bin": { "resolve": "bin/resolve" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -2258,9 +2262,9 @@ } }, "node_modules/rollup": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.1.tgz", - "integrity": "sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg==", + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.29.1.tgz", + "integrity": "sha512-RaJ45M/kmJUzSWDs1Nnd5DdV4eerC98idtUOVr6FfKcgxqvjwHmxc5upLF9qZU9EpsVzzhleFahrT3shLuJzIw==", "dev": true, "license": "MIT", "dependencies": { @@ -2274,25 +2278,25 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.28.1", - "@rollup/rollup-android-arm64": "4.28.1", - "@rollup/rollup-darwin-arm64": "4.28.1", - "@rollup/rollup-darwin-x64": "4.28.1", - "@rollup/rollup-freebsd-arm64": "4.28.1", - "@rollup/rollup-freebsd-x64": "4.28.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.28.1", - "@rollup/rollup-linux-arm-musleabihf": "4.28.1", - "@rollup/rollup-linux-arm64-gnu": "4.28.1", - "@rollup/rollup-linux-arm64-musl": "4.28.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.28.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.28.1", - "@rollup/rollup-linux-riscv64-gnu": "4.28.1", - "@rollup/rollup-linux-s390x-gnu": "4.28.1", - "@rollup/rollup-linux-x64-gnu": "4.28.1", - "@rollup/rollup-linux-x64-musl": "4.28.1", - "@rollup/rollup-win32-arm64-msvc": "4.28.1", - "@rollup/rollup-win32-ia32-msvc": "4.28.1", - "@rollup/rollup-win32-x64-msvc": "4.28.1", + "@rollup/rollup-android-arm-eabi": "4.29.1", + "@rollup/rollup-android-arm64": "4.29.1", + "@rollup/rollup-darwin-arm64": "4.29.1", + "@rollup/rollup-darwin-x64": "4.29.1", + "@rollup/rollup-freebsd-arm64": "4.29.1", + "@rollup/rollup-freebsd-x64": "4.29.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.29.1", + "@rollup/rollup-linux-arm-musleabihf": "4.29.1", + "@rollup/rollup-linux-arm64-gnu": "4.29.1", + "@rollup/rollup-linux-arm64-musl": "4.29.1", + "@rollup/rollup-linux-loongarch64-gnu": "4.29.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.29.1", + "@rollup/rollup-linux-riscv64-gnu": "4.29.1", + "@rollup/rollup-linux-s390x-gnu": "4.29.1", + "@rollup/rollup-linux-x64-gnu": "4.29.1", + "@rollup/rollup-linux-x64-musl": "4.29.1", + "@rollup/rollup-win32-arm64-msvc": "4.29.1", + "@rollup/rollup-win32-ia32-msvc": "4.29.1", + "@rollup/rollup-win32-x64-msvc": "4.29.1", "fsevents": "~2.3.2" } }, @@ -2321,9 +2325,9 @@ } }, "node_modules/sass": { - "version": "1.82.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.82.0.tgz", - "integrity": "sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q==", + "version": "1.83.0", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.0.tgz", + "integrity": "sha512-qsSxlayzoOjdvXMVLkzF84DJFc2HZEL/rFyGIKbbilYtAvlCxyuzUeff9LawTn4btVnLKg75Z8MMr1lxU1lfGw==", "license": "MIT", "dependencies": { "chokidar": "^4.0.0",