This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new ba0d71d6 Improve the inverted index (#555)
ba0d71d6 is described below
commit ba0d71d6b478f25c3d377af8543bbc70dfbf3c00
Author: Gao Hongtao <[email protected]>
AuthorDate: Mon Nov 11 21:53:51 2024 +0800
Improve the inverted index (#555)
---
.golangci.yml | 195 ++++++++++-----------
CHANGES.md | 2 +
banyand/internal/storage/index.go | 2 +-
dist/LICENSE | 10 +-
...uge.txt => license-github.com-SkyAPM-bluge.txt} | 0
...s-ice.txt => license-github.com-SkyAPM-ice.txt} | 0
go.mod | 10 +-
go.sum | 64 ++-----
pkg/index/index.go | 6 +-
pkg/index/inverted/inverted.go | 46 ++---
pkg/index/inverted/inverted_series.go | 87 ++++++---
pkg/index/inverted/inverted_series_test.go | 50 +++---
scripts/build/vendor.mk | 2 +-
test/stress/istio/istio_suite_test.go | 44 +++--
14 files changed, 246 insertions(+), 272 deletions(-)
diff --git a/.golangci.yml b/.golangci.yml
index 5c6e1433..009c8338 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -16,100 +16,100 @@
linters:
disable-all: true
enable:
- - asasalint
- - asciicheck
- # - containedctx
- - contextcheck
- - decorder
- - dogsled
- - errname
- - errcheck
- - errchkjson
- - errorlint
- - exhaustive
- # TODO:// enable this lint
- # - exhaustruct
- - gci
- - goconst
- - gocritic
- - gocyclo
- - godot
- - gofumpt
- - goprintffuncname
- - gosec
- - gosimple
- - govet
- - importas
- - ineffassign
- - lll
- - misspell
- - staticcheck
- - stylecheck
- - typecheck
- - unconvert
- - unparam
- - unused
- - usestdlibvars
- - whitespace
+ - asasalint
+ - asciicheck
+ # - containedctx
+ - contextcheck
+ - decorder
+ - dogsled
+ - errname
+ - errcheck
+ - errchkjson
+ - errorlint
+ - exhaustive
+ # TODO:// enable this lint
+ # - exhaustruct
+ - gci
+ - goconst
+ - gocritic
+ - gocyclo
+ - godot
+ - gofumpt
+ - goprintffuncname
+ - gosec
+ - gosimple
+ - govet
+ - importas
+ - ineffassign
+ - lll
+ - misspell
+ - staticcheck
+ - stylecheck
+ - typecheck
+ - unconvert
+ - unparam
+ - unused
+ - usestdlibvars
+ - whitespace
linters-settings:
importas:
no-unaliased: true
alias:
- - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/common/v1
- alias: commonv1
- - pkg:
github.com/apache/skywalking-banyandb/api/proto/banyandb/database/v1
- alias: databasev1
- - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/model/v1
- alias: modelv1
- - pkg:
github.com/apache/skywalking-banyandb/api/proto/banyandb/property/v1
- alias: propertyv1
- - pkg:
github.com/apache/skywalking-banyandb/api/proto/banyandb/measure/v1
- alias: measurev1
- - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/stream/v1
- alias: streamv1
- - pkg:
github.com/apache/skywalking-banyandb/api/proto/banyandb/cluster/v1
- alias: clusterv1
- - pkg: github.com/apache/skywalking-banyandb/pkg/pb/v1
- alias: pbv1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/common/v1
+ alias: commonv1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/database/v1
+ alias: databasev1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/model/v1
+ alias: modelv1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/property/v1
+ alias: propertyv1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/measure/v1
+ alias: measurev1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/stream/v1
+ alias: streamv1
+ - pkg: github.com/apache/skywalking-banyandb/api/proto/banyandb/cluster/v1
+ alias: clusterv1
+ - pkg: github.com/apache/skywalking-banyandb/pkg/pb/v1
+ alias: pbv1
lll:
line-length: 170
goconst:
min-occurrences: 4
govet:
enable:
- - fieldalignment
- - shadow
+ - fieldalignment
+ - shadow
misspell:
locale: US
unparam:
check-exported: false
gci:
sections:
- - standard
- - default
- - prefix(github.com/apache/skywalking-banyandb/)
+ - standard
+ - default
+ - prefix(github.com/apache/skywalking-banyandb/)
gocritic:
enabled-checks:
- - appendCombine
- - boolExprSimplify
- - builtinShadow
- - commentedOutCode
- - commentedOutImport
- - docStub
- - emptyFallthrough
- - equalFold
- - hexLiteral
- - indexAlloc
- - initClause
- - methodExprCall
- - nilValReturn
- - octalLiteral
- - rangeExprCopy
- - stringXbytes
- - typeAssertChain
- - typeUnparen
- - unnecessaryBlock
- - weakCond
+ - appendCombine
+ - boolExprSimplify
+ - builtinShadow
+ - commentedOutCode
+ - commentedOutImport
+ - docStub
+ - emptyFallthrough
+ - equalFold
+ - hexLiteral
+ - indexAlloc
+ - initClause
+ - methodExprCall
+ - nilValReturn
+ - octalLiteral
+ - rangeExprCopy
+ - stringXbytes
+ - typeAssertChain
+ - typeUnparen
+ - unnecessaryBlock
+ - weakCond
godot:
# declarations - for top level declaration comments (default);
# toplevel - for top level comments;
@@ -117,38 +117,37 @@ linters-settings:
scope: toplevel
gosec:
excludes:
- - G115 # integer overflow conversion (TODO: verify these)
+ - G115 # integer overflow conversion (TODO: verify these)
staticcheck:
- checks: ["all", "-ST1000", "-ST1016", "-ST1020", "-ST1021", "-ST1022"]
+ checks: [ "all", "-ST1000", "-ST1016", "-ST1020", "-ST1021", "-ST1022" ]
exhaustive:
check:
- - switch
- - map
+ - switch
+ - map
default-signifies-exhaustive: true
ignore-enum-members: ".+UNSPECIFIED$"
exhaustruct:
exclude:
- - 'cobra\.Command$'
+ - 'cobra\.Command$'
run:
go: "1.23"
issues:
exclude-rules:
- - path: ".*\\.pb\\.go"
- linters:
- - "*"
- - path: ".*\\.pb\\.validate\\.go"
- linters:
- - "*"
- - path: ".*\\.gen\\.go"
- linters:
- - "*"
- - path: _test\.go$|^tests/|^samples/
- linters:
- - errcheck
- - maligned
- - linters:
- - staticcheck
- text: "SA1019: package github.com/golang/protobuf"
- max-per-linter: 0
+ - path: ".*\\.pb\\.go"
+ linters:
+ - "*"
+ - path: ".*\\.pb\\.validate\\.go"
+ linters:
+ - "*"
+ - path: ".*\\.gen\\.go"
+ linters:
+ - "*"
+ - path: _test\.go$|^tests/|^samples/
+ linters:
+ - errcheck
+ - maligned
+ - linters:
+ - staticcheck
+ text: "SA1019: package github.com/golang/protobuf"
max-same-issues: 0
diff --git a/CHANGES.md b/CHANGES.md
index 3aaf6ffd..38415e5f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -8,10 +8,12 @@ Release Notes.
- Add the `bydbctl analyze series` command to analyze the series data.
- Index: Remove sortable field from the stored field. If a field is sortable
only, it won't be stored.
+- Index: Support InsertIfAbsent functionality which ensures documents are only
inserted if their docIDs are not already present in the current index. There is
a exception for the documents with extra index fields more than the entity's
index fields.
### Bug Fixes
- Fix the bug that TopN processing item leak. The item can not be updated but
as a new item.
+- Resolve data race in Stats methods of the inverted index.
### Documentation
diff --git a/banyand/internal/storage/index.go
b/banyand/internal/storage/index.go
index 2e1ad14b..ef963983 100644
--- a/banyand/internal/storage/index.go
+++ b/banyand/internal/storage/index.go
@@ -71,7 +71,7 @@ func newSeriesIndex(ctx context.Context, root string,
flushTimeoutSeconds int64,
}
func (s *seriesIndex) Write(docs index.Documents) error {
- return s.store.Batch(index.Batch{
+ return s.store.SeriesBatch(index.Batch{
Documents: docs,
})
}
diff --git a/dist/LICENSE b/dist/LICENSE
index 49b5a45b..a6503207 100644
--- a/dist/LICENSE
+++ b/dist/LICENSE
@@ -178,6 +178,8 @@
Apache-2.0 licenses
========================================================================
+ github.com/SkyAPM/bluge v0.0.0-20241111124917-c317df1af201 Apache-2.0
+ github.com/SkyAPM/ice v0.0.0-20241108011032-c3d8eea75118 Apache-2.0
github.com/apache/skywalking-cli v0.0.0-20240227151024-ee371a210afe
Apache-2.0
github.com/blevesearch/segment v0.9.1 Apache-2.0
github.com/blevesearch/vellum v1.0.10 Apache-2.0
@@ -208,9 +210,7 @@ Apache-2.0 licenses
github.com/spf13/afero v1.11.0 Apache-2.0
github.com/spf13/cobra v1.8.1 Apache-2.0
github.com/tklauser/numcpus v0.8.0 Apache-2.0
- github.com/zinclabs/bluge v1.1.5 Apache-2.0
github.com/zinclabs/bluge_segment_api v1.0.0 Apache-2.0
- github.com/zinclabs/ice v1.1.3 Apache-2.0
go.etcd.io/etcd/api/v3 v3.5.16 Apache-2.0
go.etcd.io/etcd/client/pkg/v3 v3.5.16 Apache-2.0
go.etcd.io/etcd/client/v2 v2.305.16 Apache-2.0
@@ -283,8 +283,8 @@ BSD-3-Clause licenses
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 BSD-3-Clause
golang.org/x/mod v0.21.0 BSD-3-Clause
golang.org/x/net v0.29.0 BSD-3-Clause
- golang.org/x/sys v0.25.0 BSD-3-Clause
- golang.org/x/text v0.18.0 BSD-3-Clause
+ golang.org/x/sys v0.26.0 BSD-3-Clause
+ golang.org/x/text v0.19.0 BSD-3-Clause
golang.org/x/time v0.6.0 BSD-3-Clause
golang.org/x/tools v0.25.0 BSD-3-Clause
google.golang.org/protobuf v1.34.2 BSD-3-Clause
@@ -293,7 +293,7 @@ BSD-3-Clause licenses
BSD-3-Clause and Apache-2.0 and MIT licenses
========================================================================
- github.com/klauspost/compress v1.17.9 BSD-3-Clause and Apache-2.0 and MIT
+ github.com/klauspost/compress v1.17.11 BSD-3-Clause and Apache-2.0 and MIT
========================================================================
CC0-1.0 licenses
diff --git a/dist/licenses/license-github.com-zinclabs-bluge.txt
b/dist/licenses/license-github.com-SkyAPM-bluge.txt
similarity index 100%
rename from dist/licenses/license-github.com-zinclabs-bluge.txt
rename to dist/licenses/license-github.com-SkyAPM-bluge.txt
diff --git a/dist/licenses/license-github.com-zinclabs-ice.txt
b/dist/licenses/license-github.com-SkyAPM-ice.txt
similarity index 100%
rename from dist/licenses/license-github.com-zinclabs-ice.txt
rename to dist/licenses/license-github.com-SkyAPM-ice.txt
diff --git a/go.mod b/go.mod
index c5c5a97f..56646ccf 100644
--- a/go.mod
+++ b/go.mod
@@ -96,7 +96,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
- github.com/klauspost/compress v1.17.9
+ github.com/klauspost/compress v1.17.11
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683 //
indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
@@ -144,8 +144,8 @@ require (
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
- golang.org/x/sys v0.25.0
- golang.org/x/text v0.18.0 // indirect
+ golang.org/x/sys v0.26.0
+ golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.25.0 // indirect
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 //
indirect
@@ -157,7 +157,7 @@ require (
replace (
github.com/benbjohnson/clock v1.3.0 => github.com/SkyAPM/clock
v1.3.1-0.20220809233656-dc7607c94a97
- github.com/blugelabs/bluge => github.com/zinclabs/bluge v1.1.5
+ github.com/blugelabs/bluge => github.com/SkyAPM/bluge
v0.0.0-20241111124917-c317df1af201
github.com/blugelabs/bluge_segment_api =>
github.com/zinclabs/bluge_segment_api v1.0.0
- github.com/blugelabs/ice => github.com/zinclabs/ice v1.1.3
+ github.com/blugelabs/ice => github.com/SkyAPM/ice
v0.0.0-20241108011032-c3d8eea75118
)
diff --git a/go.sum b/go.sum
index 7872c57a..0d9c71db 100644
--- a/go.sum
+++ b/go.sum
@@ -6,14 +6,15 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod
h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE
github.com/RoaringBitmap/roaring v0.9.4/go.mod
h1:icnadbWcNyfEHlYdr+tDlOTih1Bf/h+rzPpv4sbomAA=
github.com/RoaringBitmap/roaring v1.9.4
h1:yhEIoH4YezLYT04s1nHehNO64EKFTop/wBhxv2QzDdQ=
github.com/RoaringBitmap/roaring v1.9.4/go.mod
h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90=
+github.com/SkyAPM/bluge v0.0.0-20241111124917-c317df1af201
h1:QX/WvtL8j5Zrbs68EVEiOE2nFQSvoT5oTkOFh2uNSpg=
+github.com/SkyAPM/bluge v0.0.0-20241111124917-c317df1af201/go.mod
h1:6o9wC3xO3qb5Q7VmD1x0r54qQBDpO9+ghGAQvuOHsCU=
github.com/SkyAPM/clock v1.3.1-0.20220809233656-dc7607c94a97
h1:FKuhJ+6n/DHspGeLleeNbziWnKr9gHKYN4q7NcoCp4s=
github.com/SkyAPM/clock v1.3.1-0.20220809233656-dc7607c94a97/go.mod
h1:2xGRl9H1pllhxTbEGO1W3gDkip8P9GQaHPni/wpdR44=
-github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod
h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
+github.com/SkyAPM/ice v0.0.0-20241108011032-c3d8eea75118
h1:Ja62sgOCp2qPTd8Xmldv1U83v11IRIsh6KlB7UaFLj4=
+github.com/SkyAPM/ice v0.0.0-20241108011032-c3d8eea75118/go.mod
h1:DoQeb0Ee86LyruZSL77Ddscfk/THJ38x453CRCnGEPI=
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/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod
h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
-github.com/axiomhq/hyperloglog v0.0.0-20191112132149-a4c4c47bc57f/go.mod
h1:2stgcRjl6QmW+gU2h5E7BQXg4HU0gzxKWDuT5HviN9s=
github.com/axiomhq/hyperloglog v0.2.0
h1:u1XT3yyY1rjzlWuP6NQIrV4bRYHOaqZaovqjcBEvZJo=
github.com/axiomhq/hyperloglog v0.2.0/go.mod
h1:GcgMjz9gaDKZ3G0UMS6Fq/VkZ4l7uGgcJyxA7M+omIM=
github.com/benbjohnson/clock v1.1.0/go.mod
h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
@@ -25,15 +26,12 @@ github.com/bits-and-blooms/bitset v1.14.3
h1:Gd2c8lSNf9pKXom5JtD7AaKO8o7fGQ2LtFj
github.com/bits-and-blooms/bitset v1.14.3/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.3/go.mod
h1:pYvKl/grLQrBxuaRYgoTssa4rVujYYeenDp++2E+yvs=
github.com/blevesearch/mmap-go v1.0.4
h1:OVhDhT5B/M1HNPpYPBKIEJaD0F3Si+CrEKULGCDPWmc=
github.com/blevesearch/mmap-go v1.0.4/go.mod
h1:EWmEAOmdAS9z/pi/+Toxu99DnsbhG1TIxUoRmJw/pSs=
-github.com/blevesearch/segment v0.9.0/go.mod
h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ=
github.com/blevesearch/segment v0.9.1
h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU=
github.com/blevesearch/segment v0.9.1/go.mod
h1:zN21iLm7+GnBHWTao9I+Au/7MBiL8pPFtJBJTsk6kQw=
github.com/blevesearch/snowballstem v0.9.0
h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s=
github.com/blevesearch/snowballstem v0.9.0/go.mod
h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs=
-github.com/blevesearch/vellum v1.0.7/go.mod
h1:doBZpmRhwTsASB4QdUZANlJvqVAUdUyX0ZK7QJCTeBE=
github.com/blevesearch/vellum v1.0.10
h1:HGPJDT2bTva12hrHepVT3rOyIKFFF4t7Gf6yMxyMIPI=
github.com/blevesearch/vellum v1.0.10/go.mod
h1:ul1oT0FhSMDIExNjIxHqJoGpVrBpKCdgDQNxfqgJt7k=
github.com/caio/go-tdigest v3.1.0+incompatible
h1:uoVMJ3Q5lXmVLCCqaMGHLBWnbGoN6Lpu7OAUPR60cds=
@@ -51,14 +49,10 @@ github.com/cncf/udpa/go
v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnht
github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod
h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/datadriven v1.0.2
h1:H9MtNqVoVhvd9nCBwOyDjUEdZCREqbIdCJD93PBm/jA=
github.com/cockroachdb/datadriven v1.0.2/go.mod
h1:a9RdTaap04u637JoCzcUoIcDmvwSUtcUFtT/C3kJlTU=
-github.com/coreos/etcd v3.3.10+incompatible/go.mod
h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
-github.com/coreos/go-etcd v2.0.0+incompatible/go.mod
h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
-github.com/coreos/go-semver v0.2.0/go.mod
h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-semver v0.3.1
h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4=
github.com/coreos/go-semver v0.3.1/go.mod
h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec=
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 v1.0.10/go.mod
h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
github.com/cpuguy83/go-md2man/v2 v2.0.4
h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod
h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -68,7 +62,6 @@ github.com/davecgh/go-spew
v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8Yc
github.com/dchest/siphash v1.2.2/go.mod
h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4=
github.com/dchest/siphash v1.2.3
h1:QXwFc8cFOR2dSa/gE6o/HokBMWtLUaNDVd+22aKHeEA=
github.com/dchest/siphash v1.2.3/go.mod
h1:0NvQU092bT0ipiFN++/rXm69QG9tVxLAlQHIXMPAkHc=
-github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod
h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140
h1:y7y0Oa6UawqTFPCDw9JG6pdKt4F9pAhHv0B7FMGaGD0=
github.com/dgryski/go-metro v0.0.0-20211217172704-adc40b04c140/go.mod
h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw=
github.com/dustin/go-humanize v1.0.1
h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
@@ -84,10 +77,8 @@ github.com/envoyproxy/go-control-plane
v0.9.9-0.20210512163311-63b5d3c536b0/go.m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod
h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/envoyproxy/protoc-gen-validate v1.1.0
h1:tntQDh69XqOCOZsDz0lVJQez/2L6Uu2PdjCQwWCJ3bM=
github.com/envoyproxy/protoc-gen-validate v1.1.0/go.mod
h1:sXRDRVmzEbkM7CVcM06s9shE/m23dg3wzjl0UWqJ2q4=
-github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod
h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/frankban/quicktest v1.14.6
h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
github.com/frankban/quicktest v1.14.6/go.mod
h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
-github.com/fsnotify/fsnotify v1.4.7/go.mod
h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.7.0
h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA=
github.com/fsnotify/fsnotify v1.7.0/go.mod
h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM=
github.com/ghodss/yaml v1.0.0/go.mod
h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
@@ -113,7 +104,6 @@ github.com/gogo/protobuf v1.3.2
h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod
h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt/v4 v4.5.0
h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang-jwt/jwt/v4 v4.5.0/go.mod
h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
-github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod
h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod
h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod
h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod
h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -168,22 +158,18 @@ github.com/hashicorp/golang-lru v1.0.2
h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iP
github.com/hashicorp/golang-lru v1.0.2/go.mod
h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod
h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod
h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/inconshreveable/mousetrap v1.1.0
h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod
h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
-github.com/influxdata/influxdb v1.7.6/go.mod
h1:qZna6X/4elxqT3yI9iZYdZrWWdeFOOprn86kgg4+IzY=
github.com/jonboulle/clockwork v0.4.0
h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4=
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/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod
h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
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=
github.com/kkdai/maglev v0.2.0/go.mod
h1:d+mt8Lmt3uqi9aRb/BnPjzD0fy+ETs1vVXiGRnqHVZ4=
-github.com/klauspost/compress v1.15.2/go.mod
h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
-github.com/klauspost/compress v1.17.9
h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
-github.com/klauspost/compress v1.17.9/go.mod
h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
+github.com/klauspost/compress v1.17.11
h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
+github.com/klauspost/compress v1.17.11/go.mod
h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod
h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/pretty v0.1.0/go.mod
h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
@@ -200,7 +186,6 @@ github.com/lufia/plan9stats
v0.0.0-20240909124753-873cd0166683 h1:7UMa6KCCMjZEMD
github.com/lufia/plan9stats v0.0.0-20240909124753-873cd0166683/go.mod
h1:ilwx/Dta8jXAgpFYFvSWEMwxmbWXyiUHkd5FwyKhb5k=
github.com/machinebox/graphql v0.2.2
h1:dWKpJligYKhYKO5A2gvNhkJdQMNZeChZYyBbrZkBZfo=
github.com/machinebox/graphql v0.2.2/go.mod
h1:F+kbVMHuwrQ5tYgU9JXlnskM8nOaFxCAEolaQybkjWA=
-github.com/magiconair/properties v1.8.0/go.mod
h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.7
h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
github.com/magiconair/properties v1.8.7/go.mod
h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
@@ -211,8 +196,6 @@ github.com/mattn/go-isatty v0.0.16/go.mod
h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/
github.com/mattn/go-isatty v0.0.19/go.mod
h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-isatty v0.0.20
h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod
h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
-github.com/mitchellh/go-homedir v1.1.0/go.mod
h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/mapstructure v1.1.2/go.mod
h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mitchellh/mapstructure v1.5.0
h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod
h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod
h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
@@ -233,7 +216,6 @@ github.com/onsi/ginkgo/v2 v2.20.2/go.mod
h1:K9gyxPIlb+aIvnZ8bd9Ak+YP18w3APlR+5co
github.com/onsi/gomega v1.34.2 h1:pNCwDkzrsv7MS9kpaQvVb1aVLahQXyJ/Tv5oAZMI3i8=
github.com/onsi/gomega v1.34.2/go.mod
h1:v1xfxRgk0KIsG+QOdm7p8UosrOzPYRo60fd3B/1Dukc=
github.com/opentracing/opentracing-go v1.1.0/go.mod
h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
-github.com/pelletier/go-toml v1.2.0/go.mod
h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml/v2 v2.2.3
h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
github.com/pelletier/go-toml/v2 v2.2.3/go.mod
h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
github.com/pkg/errors v0.8.1/go.mod
h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -261,7 +243,6 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod
h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8=
github.com/rs/zerolog v1.33.0/go.mod
h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss=
-github.com/russross/blackfriday v1.5.2/go.mod
h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday/v2 v2.1.0
h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod
h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sagikazarmark/locafero v0.6.0
h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk=
@@ -285,20 +266,14 @@ github.com/sourcegraph/conc v0.3.0/go.mod
h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIK
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod
h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spaolacci/murmur3 v1.1.0
h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod
h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/afero v1.1.2/go.mod
h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
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.3.0/go.mod
h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
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/cobra v0.0.5/go.mod
h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
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/jwalterweatherman v1.0.0/go.mod
h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
-github.com/spf13/pflag v1.0.3/go.mod
h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod
h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.3.2/go.mod
h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI=
github.com/spf13/viper v1.19.0/go.mod
h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg=
github.com/stretchr/objx v0.1.0/go.mod
h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -318,14 +293,12 @@ github.com/tklauser/numcpus v0.8.0
h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYg
github.com/tklauser/numcpus v0.8.0/go.mod
h1:ZJZlAY+dmR4eut8epnzf0u/VwodKmryxR8txiloSqBE=
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75
h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod
h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
-github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod
h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
github.com/urfave/cli/v2 v2.27.4
h1:o1owoI+02Eb+K107p27wEX9Bb8eqIoZCfLXloLUSWJ8=
github.com/urfave/cli/v2 v2.27.4/go.mod
h1:m4QzxcD2qpra4z7WhzEGn74WZLViBnMpb1ToCAKdGRQ=
github.com/xhit/go-str2duration/v2 v2.1.0
h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod
h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510
h1:S2dVYn90KE98chqDkyE9Z4N61UnQd+KOfgp5Iu53llk=
github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod
h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod
h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1
h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4=
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod
h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM=
github.com/yuin/goldmark v1.1.27/go.mod
h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -336,12 +309,8 @@ github.com/yusufpapurcu/wmi v1.2.4
h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo
github.com/yusufpapurcu/wmi v1.2.4/go.mod
h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
github.com/zenizh/go-capturer v0.0.0-20211219060012-52ea6c8fed04
h1:qXafrlZL1WsJW5OokjraLLRURHiw0OzKHD/RNdspp4w=
github.com/zenizh/go-capturer v0.0.0-20211219060012-52ea6c8fed04/go.mod
h1:FiwNQxz6hGoNFBC4nIx+CxZhI3nne5RmIOlT/MXcSD4=
-github.com/zinclabs/bluge v1.1.5
h1:QJhkweeBVRaaEPdaRptkYOJDLCeyo+JBgc2hNyFehAM=
-github.com/zinclabs/bluge v1.1.5/go.mod
h1:IG9JlDUzUGRIxylWmLyF7e1QwMdRWu9FkNSivJ4VB+E=
github.com/zinclabs/bluge_segment_api v1.0.0
h1:GJvPxdzR7KjwdxmcKleQLvtIYi/J7Q7ehRlZqgGayzg=
github.com/zinclabs/bluge_segment_api v1.0.0/go.mod
h1:mYfPVUdXLZ4iXsicXMER+RcI/avwphjMOi8nhN9HDLA=
-github.com/zinclabs/ice v1.1.3 h1:LNfncdxQw2ix6P1T2ISmhO+6BFRa27qyTTfK0PitF2c=
-github.com/zinclabs/ice v1.1.3/go.mod
h1:wTwGEe30mQnSLaR1ezxu4E80GcwO6EyOww67KpJtIiw=
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
go.etcd.io/etcd/api/v3 v3.5.16 h1:WvmyJVbjWqK4R1E+B12RRHz3bRGy9XVfh++MgbN+6n0=
@@ -387,7 +356,6 @@ go.uber.org/multierr v1.11.0/go.mod
h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8
go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
-golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod
h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod
h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod
h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod
h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
@@ -399,13 +367,9 @@ golang.org/x/crypto v0.23.0/go.mod
h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v
golang.org/x/crypto v0.25.0/go.mod
h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod
h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
-golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod
h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod
h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod
h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod
h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod
h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
-golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod
h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs=
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=
@@ -463,11 +427,9 @@ golang.org/x/sync v0.7.0/go.mod
h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -492,8 +454,8 @@ golang.org/x/sys v0.16.0/go.mod
h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
-golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=
+golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod
h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod
h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod
h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -515,14 +477,12 @@ golang.org/x/text v0.13.0/go.mod
h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
golang.org/x/text v0.14.0/go.mod
h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0/go.mod
h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.16.0/go.mod
h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
-golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
-golang.org/x/text v0.18.0/go.mod
h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
+golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM=
+golang.org/x/text v0.19.0/go.mod
h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
-golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod
h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod
h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod
h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod
h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod
h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod
h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod
h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
@@ -542,11 +502,8 @@ golang.org/x/xerrors
v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod
h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo=
gonum.org/v1/gonum v0.7.0 h1:Hdks0L0hgznZLG9nzXb8vZ0rRvqNvAcgAp84y7Mwkgw=
gonum.org/v1/gonum v0.7.0/go.mod
h1:L02bwd0sqlsvRv41G7wGWFCsVNZFv/k1xzGIxeANHGM=
-gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod
h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw=
-gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod
h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc=
google.golang.org/appengine v1.1.0/go.mod
h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod
h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod
h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
@@ -605,7 +562,6 @@ gopkg.in/yaml.v3 v3.0.1
h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod
h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod
h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
skywalking.apache.org/repo/goapi v0.0.0-20240604102541-64f9001abe03
h1:y0f+3gNmeyC/V5Bt8VE9aL9mmWESj+WvyqJ2tOb7qrk=
diff --git a/pkg/index/index.go b/pkg/index/index.go
index 035fbf83..fdcb2c92 100644
--- a/pkg/index/index.go
+++ b/pkg/index/index.go
@@ -58,11 +58,6 @@ func (f FieldKey) Marshal() string {
return string(convert.Uint32ToBytes(f.IndexRuleID))
}
-// HasSeriesID reports whether f has a series id.
-func (f FieldKey) HasSeriesID() bool {
- return f.SeriesID > 0
-}
-
// Field is a indexed item in a document.
type Field struct {
Term []byte
@@ -169,6 +164,7 @@ type Batch struct {
// Writer allows writing fields and docID in a document to an index.
type Writer interface {
Batch(batch Batch) error
+ SeriesBatch(batch Batch) error
}
// FieldIterable allows building a FieldIterator.
diff --git a/pkg/index/inverted/inverted.go b/pkg/index/inverted/inverted.go
index 094f405b..084ef729 100644
--- a/pkg/index/inverted/inverted.go
+++ b/pkg/index/inverted/inverted.go
@@ -113,12 +113,8 @@ func (s *store) Batch(batch index.Batch) error {
b := generateBatch()
defer releaseBatch(b)
for _, d := range batch.Documents {
- var fk *index.FieldKey
- if len(d.Fields) > 0 {
- fk = &d.Fields[0].Key
- }
doc :=
bluge.NewDocument(convert.BytesToString(convert.Uint64ToBytes(d.DocID)))
- for _, f := range d.Fields {
+ for i, f := range d.Fields {
tf := bluge.NewKeywordFieldBytes(f.Key.Marshal(),
f.Term)
if !f.NoSort {
tf.Sortable()
@@ -130,17 +126,15 @@ func (s *store) Batch(batch index.Batch) error {
tf = tf.WithAnalyzer(Analyzers[f.Key.Analyzer])
}
doc.AddField(tf)
+ if i == 0 {
+
doc.AddField(bluge.NewKeywordFieldBytes(seriesIDField,
f.Key.SeriesID.Marshal()).StoreValue())
+ }
}
- if d.EntityValues != nil {
- doc.AddField(bluge.NewKeywordFieldBytes(entityField,
d.EntityValues).StoreValue())
- } else if fk != nil && fk.HasSeriesID() {
- doc.AddField(bluge.NewKeywordFieldBytes(seriesIDField,
fk.SeriesID.Marshal()).StoreValue())
- }
if d.Timestamp > 0 {
doc.AddField(bluge.NewDateTimeField(timestampField,
time.Unix(0, d.Timestamp)).StoreValue())
}
- b.Update(doc.ID(), doc)
+ b.Insert(doc)
}
return s.writer.Batch(b)
}
@@ -196,14 +190,18 @@ func (s *store) Iterator(ctx context.Context, fieldKey
index.FieldKey, termRange
fk := fieldKey.Marshal()
rangeQuery := bluge.NewBooleanQuery()
rangeNode := newMustNode()
- addRange := func(query *bluge.BooleanQuery, termRange index.RangeOpts)
*bluge.BooleanQuery {
+
+ rangeQuery =
rangeQuery.AddMust(bluge.NewTermQuery(string(fieldKey.SeriesID.Marshal())).
+ SetField(seriesIDField))
+ rangeNode.Append(newTermNode(string(fieldKey.SeriesID.Marshal()), nil))
+ if termRange.Lower != nil || termRange.Upper != nil {
if termRange.Upper == nil {
termRange.Upper = defaultUpper
}
if termRange.Lower == nil {
termRange.Lower = defaultLower
}
- query.AddMust(bluge.NewTermRangeInclusiveQuery(
+ rangeQuery.AddMust(bluge.NewTermRangeInclusiveQuery(
string(termRange.Lower),
string(termRange.Upper),
termRange.IncludesLower,
@@ -211,18 +209,6 @@ func (s *store) Iterator(ctx context.Context, fieldKey
index.FieldKey, termRange
).
SetField(fk))
rangeNode.Append(newTermRangeInclusiveNode(string(termRange.Lower),
string(termRange.Upper), termRange.IncludesLower, termRange.IncludesUpper, nil))
- return query
- }
-
- if fieldKey.HasSeriesID() {
- rangeQuery =
rangeQuery.AddMust(bluge.NewTermQuery(string(fieldKey.SeriesID.Marshal())).
- SetField(seriesIDField))
-
rangeNode.Append(newTermNode(string(fieldKey.SeriesID.Marshal()), nil))
- if termRange.Lower != nil || termRange.Upper != nil {
- rangeQuery = addRange(rangeQuery, termRange)
- }
- } else {
- rangeQuery = addRange(rangeQuery, termRange)
}
sortedKey := fk
@@ -252,11 +238,9 @@ func (s *store) MatchTerms(field index.Field) (list
posting.List, err error) {
}
fk := field.Key.Marshal()
query := bluge.NewBooleanQuery().
- AddMust(bluge.NewTermQuery(string(field.Term)).SetField(fk))
- if field.Key.HasSeriesID() {
- query =
query.AddMust(bluge.NewTermQuery(string(field.Key.SeriesID.Marshal())).
+ AddMust(bluge.NewTermQuery(string(field.Term)).SetField(fk)).
+
AddMust(bluge.NewTermQuery(string(field.Key.SeriesID.Marshal())).
SetField(seriesIDField))
- }
documentMatchIterator, err := reader.Search(context.Background(),
bluge.NewAllMatches(query))
if err != nil {
return nil, err
@@ -283,9 +267,7 @@ func (s *store) Match(fieldKey index.FieldKey, matches
[]string, opts *modelv1.C
analyzer, operator := getMatchOptions(fieldKey.Analyzer, opts)
fk := fieldKey.Marshal()
query := bluge.NewBooleanQuery()
- if fieldKey.HasSeriesID() {
-
query.AddMust(bluge.NewTermQuery(string(fieldKey.SeriesID.Marshal())).SetField(seriesIDField))
- }
+
query.AddMust(bluge.NewTermQuery(string(fieldKey.SeriesID.Marshal())).SetField(seriesIDField))
for _, m := range matches {
query.AddMust(bluge.NewMatchQuery(m).SetField(fk).
SetAnalyzer(analyzer).SetOperator(operator))
diff --git a/pkg/index/inverted/inverted_series.go
b/pkg/index/inverted/inverted_series.go
index fcf8f467..9d0b15ed 100644
--- a/pkg/index/inverted/inverted_series.go
+++ b/pkg/index/inverted/inverted_series.go
@@ -22,6 +22,7 @@ import (
"bytes"
"context"
"io"
+ "time"
"github.com/blugelabs/bluge"
"github.com/blugelabs/bluge/search"
@@ -37,6 +38,45 @@ import (
var emptySeries = make([]index.SeriesDocument, 0)
+func (s *store) SeriesBatch(batch index.Batch) error {
+ if len(batch.Documents) == 0 {
+ return nil
+ }
+ if !s.closer.AddRunning() {
+ return nil
+ }
+ defer s.closer.Done()
+ b := generateBatch()
+ defer releaseBatch(b)
+ for _, d := range batch.Documents {
+ doc :=
bluge.NewDocument(convert.BytesToString(convert.Uint64ToBytes(d.DocID)))
+ for _, f := range d.Fields {
+ tf := bluge.NewKeywordFieldBytes(f.Key.Marshal(),
f.Term)
+ if !f.NoSort {
+ tf.Sortable()
+ }
+ if f.Store {
+ tf.StoreValue()
+ }
+ if f.Key.Analyzer != index.AnalyzerUnspecified {
+ tf = tf.WithAnalyzer(Analyzers[f.Key.Analyzer])
+ }
+ doc.AddField(tf)
+ }
+
+ doc.AddField(bluge.NewKeywordFieldBytes(entityField,
d.EntityValues).StoreValue())
+ if d.Timestamp > 0 {
+ doc.AddField(bluge.NewDateTimeField(timestampField,
time.Unix(0, d.Timestamp)).StoreValue())
+ }
+ if len(d.Fields) == 0 {
+ b.InsertIfAbsent(doc.ID(), doc)
+ } else {
+ b.Update(doc.ID(), doc)
+ }
+ }
+ return s.writer.Batch(b)
+}
+
// BuildQuery implements index.SeriesStore.
func (s *store) BuildQuery(seriesMatchers []index.SeriesMatcher,
secondaryQuery index.Query) (index.Query, error) {
if len(seriesMatchers) == 0 {
@@ -104,6 +144,10 @@ func (s *store) Search(ctx context.Context,
return nil, err
}
defer func() {
+ if err := recover(); err != nil {
+ _ = reader.Close()
+ panic(err)
+ }
_ = reader.Close()
}()
@@ -183,36 +227,23 @@ func (s *store) SeriesSort(ctx context.Context, fieldKey
index.FieldKey, termRan
return nil, err
}
fk := fieldKey.Marshal()
- rangeQuery := bluge.NewBooleanQuery()
- rangeNode := newMustNode()
- addRange := func(query *bluge.BooleanQuery, termRange index.RangeOpts)
*bluge.BooleanQuery {
- if termRange.Upper == nil {
- termRange.Upper = defaultUpper
- }
- if termRange.Lower == nil {
- termRange.Lower = defaultLower
- }
- query.AddMust(bluge.NewTermRangeInclusiveQuery(
- string(termRange.Lower),
- string(termRange.Upper),
- termRange.IncludesLower,
- termRange.IncludesUpper,
- ).
- SetField(fk))
-
rangeNode.Append(newTermRangeInclusiveNode(string(termRange.Lower),
string(termRange.Upper), termRange.IncludesLower, termRange.IncludesUpper, nil))
- return query
- }
- if fieldKey.HasSeriesID() {
- rangeQuery =
rangeQuery.AddMust(bluge.NewTermQuery(string(fieldKey.SeriesID.Marshal())).
- SetField(seriesIDField))
-
rangeNode.Append(newTermNode(string(fieldKey.SeriesID.Marshal()), nil))
- if termRange.Lower != nil || termRange.Upper != nil {
- rangeQuery = addRange(rangeQuery, termRange)
- }
- } else {
- rangeQuery = addRange(rangeQuery, termRange)
+ if termRange.Upper == nil {
+ termRange.Upper = defaultUpper
+ }
+ if termRange.Lower == nil {
+ termRange.Lower = defaultLower
}
+ rangeQuery := bluge.NewBooleanQuery()
+ rangeQuery.AddMust(bluge.NewTermRangeInclusiveQuery(
+ string(termRange.Lower),
+ string(termRange.Upper),
+ termRange.IncludesLower,
+ termRange.IncludesUpper,
+ ).
+ SetField(fk))
+ rangeNode := newMustNode()
+ rangeNode.Append(newTermRangeInclusiveNode(string(termRange.Lower),
string(termRange.Upper), termRange.IncludesLower, termRange.IncludesUpper, nil))
sortedKey := fk
if order == modelv1.Sort_SORT_DESC {
diff --git a/pkg/index/inverted/inverted_series_test.go
b/pkg/index/inverted/inverted_series_test.go
index 44fe9671..cd0a3bd4 100644
--- a/pkg/index/inverted/inverted_series_test.go
+++ b/pkg/index/inverted/inverted_series_test.go
@@ -76,16 +76,6 @@ func TestStore_Search(t *testing.T) {
term: [][]byte{[]byte("test1"), []byte("test2"),
[]byte("test3"), []byte("foo")},
projection: []index.FieldKey{fieldKeyDuration,
fieldKeyServiceName},
want: []index.SeriesDocument{
- {
- Key: index.Series{
- ID:
common.SeriesID(1),
- EntityValues: []byte("test1"),
- },
- Fields: map[string][]byte{
- fieldKeyDuration.Marshal():
nil,
- fieldKeyServiceName.Marshal():
nil,
- },
- },
{
Key: index.Series{
ID:
common.SeriesID(2),
@@ -106,21 +96,22 @@ func TestStore_Search(t *testing.T) {
fieldKeyServiceName.Marshal():
nil,
},
},
- },
- },
- {
- term: [][]byte{[]byte("test1"), []byte("test2"),
[]byte("test3"), []byte("foo")},
- projection: []index.FieldKey{fieldKeyDuration},
- want: []index.SeriesDocument{
{
Key: index.Series{
ID:
common.SeriesID(1),
EntityValues: []byte("test1"),
},
Fields: map[string][]byte{
- fieldKeyDuration.Marshal(): nil,
+ fieldKeyDuration.Marshal():
nil,
+ fieldKeyServiceName.Marshal():
nil,
},
},
+ },
+ },
+ {
+ term: [][]byte{[]byte("test1"), []byte("test2"),
[]byte("test3"), []byte("foo")},
+ projection: []index.FieldKey{fieldKeyDuration},
+ want: []index.SeriesDocument{
{
Key: index.Series{
ID:
common.SeriesID(2),
@@ -139,21 +130,21 @@ func TestStore_Search(t *testing.T) {
fieldKeyDuration.Marshal():
convert.Int64ToBytes(int64(500)),
},
},
- },
- },
- {
- term: [][]byte{[]byte("test1"), []byte("test2"),
[]byte("test3"), []byte("foo")},
- projection: []index.FieldKey{fieldKeyServiceName},
- want: []index.SeriesDocument{
{
Key: index.Series{
ID:
common.SeriesID(1),
EntityValues: []byte("test1"),
},
Fields: map[string][]byte{
- fieldKeyServiceName.Marshal():
nil,
+ fieldKeyDuration.Marshal(): nil,
},
},
+ },
+ },
+ {
+ term: [][]byte{[]byte("test1"), []byte("test2"),
[]byte("test3"), []byte("foo")},
+ projection: []index.FieldKey{fieldKeyServiceName},
+ want: []index.SeriesDocument{
{
Key: index.Series{
ID:
common.SeriesID(2),
@@ -172,6 +163,15 @@ func TestStore_Search(t *testing.T) {
fieldKeyServiceName.Marshal():
nil,
},
},
+ {
+ Key: index.Series{
+ ID:
common.SeriesID(1),
+ EntityValues: []byte("test1"),
+ },
+ Fields: map[string][]byte{
+ fieldKeyServiceName.Marshal():
nil,
+ },
+ },
},
},
{
@@ -393,7 +393,7 @@ func setupData(tester *require.Assertions, s
index.SeriesStore) {
},
},
}
- tester.NoError(s.Batch(index.Batch{
+ tester.NoError(s.SeriesBatch(index.Batch{
Documents: []index.Document{series1, series2, series3, series3},
}))
}
diff --git a/scripts/build/vendor.mk b/scripts/build/vendor.mk
index 2823aaf8..a8773ac1 100644
--- a/scripts/build/vendor.mk
+++ b/scripts/build/vendor.mk
@@ -21,5 +21,5 @@
.PHONY: vendor-update
vendor-update: ## Update vendors
- go get -u -d ./...
+ go get -u ./...
go mod tidy -compat=1.23
diff --git a/test/stress/istio/istio_suite_test.go
b/test/stress/istio/istio_suite_test.go
index d57e6bc8..e3adede2 100644
--- a/test/stress/istio/istio_suite_test.go
+++ b/test/stress/istio/istio_suite_test.go
@@ -132,35 +132,43 @@ func ReadAndWriteFromFile(filePath string, conn
*grpc.ClientConn) (int, error) {
bulkSize := 2000
c := measurev1.NewMeasureServiceClient(conn)
ctx := context.Background()
- client, err := c.Write(ctx)
- if err != nil {
+ var client grpc.BidiStreamingClient[measurev1.WriteRequest,
measurev1.WriteResponse]
+ createClient := func() error {
+ var err error
+ client, err = c.Write(ctx)
+ if err != nil {
+ return fmt.Errorf("failed to create write client: %w",
err)
+ }
+ go func(c grpc.BidiStreamingClient[measurev1.WriteRequest,
measurev1.WriteResponse]) {
+ for {
+ _, err = c.Recv()
+ if errors.Is(err, io.EOF) || errors.Is(err,
context.Canceled) {
+ return
+ }
+ if err != nil {
+ l.Error().Err(err).Msg("failed to
receive response from measureService")
+ return
+ }
+ }
+ }(client)
+ return nil
+ }
+ if err := createClient(); err != nil {
return 0, fmt.Errorf("failed to create write client: %w", err)
}
writeCount := 0
- flush := func(createClient bool) error {
+ flush := func(newClient bool) error {
if errClose := client.CloseSend(); errClose != nil {
return fmt.Errorf("failed to close send: %w", errClose)
}
bulkSize = 2000
writeCount += 2000
- for i := 0; i < 2000; i++ {
- _, err = client.Recv()
- if err != nil && !errors.Is(err, io.EOF) {
- return fmt.Errorf("failed to receive client:
%w", err)
- }
- if errors.Is(err, io.EOF) {
- break
- }
- }
- if !createClient {
+ if !newClient {
return nil
}
- client, err = c.Write(ctx)
- if err != nil {
- return fmt.Errorf("failed to create write client: %w",
err)
- }
- return nil
+ return createClient()
}
+ var err error
loop := func(round int) error {
currentTime := startTime.Add(time.Duration(round) * time.Minute)
minute = currentTime.Truncate(time.Minute)