Skip to content

Commit

Permalink
Upgrade thanos version to fix store gateway buf reuse issue (cortexpr…
Browse files Browse the repository at this point in the history
…oject#6346)

* upgrade thanos version to fix store gateway buf reuse issue

Signed-off-by: Ben Ye <[email protected]>

* change to always flush old when resolving DNS records

Signed-off-by: Ben Ye <[email protected]>

---------

Signed-off-by: Ben Ye <[email protected]>
  • Loading branch information
yeya24 authored Nov 20, 2024
1 parent 098a22a commit 78a9e35
Show file tree
Hide file tree
Showing 21 changed files with 132 additions and 66 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ require (
github.com/stretchr/testify v1.9.0
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31
github.com/thanos-io/thanos v0.35.2-0.20241029125830-62038110b1bc
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5
go.etcd.io/etcd/api/v3 v3.5.17
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1687,8 +1687,8 @@ github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d h1:k+SLTP1mjNqX
github.com/thanos-io/objstore v0.0.0-20241028150459-cfdd0e50390d/go.mod h1:/ZMUxFcp/nT6oYV5WslH9k07NU/+86+aibgZRmMMr/4=
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31 h1:xPaP58g+3EPohdw4cv+6jv5+LcX6LynhHvQcYwTAMxQ=
github.com/thanos-io/promql-engine v0.0.0-20240921092401-37747eddbd31/go.mod h1:wx0JlRZtsB2S10JYUgeg5GqLfMxw31SzArP+28yyE00=
github.com/thanos-io/thanos v0.35.2-0.20241029125830-62038110b1bc h1:AoIDFFb3xjED+mmf5g6bnULDgNJWeXtKyjAQ1CKtqfk=
github.com/thanos-io/thanos v0.35.2-0.20241029125830-62038110b1bc/go.mod h1:6Q6xfe4mUYCYbrixod2dNZqKCK4J9pGRKqF29/cUr/A=
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171 h1:khQQmo9VMMphKm10NS22iI8bAIf4DNRFvLoP4IR7kK4=
github.com/thanos-io/thanos v0.35.2-0.20241118113652-f998fc59c171/go.mod h1:v2AUVRd44iuv/PY0iwzKzgosLusUg7/dnnw5KEe1Has=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o=
Expand Down
2 changes: 1 addition & 1 deletion pkg/chunk/cache/memcached_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (c *memcachedClient) updateMemcacheServers() error {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()

if err := c.provider.Resolve(ctx, c.addresses); err != nil {
if err := c.provider.Resolve(ctx, c.addresses, true); err != nil {
return err
}
servers = c.provider.Addresses()
Expand Down
1 change: 1 addition & 0 deletions pkg/compactor/compactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,7 @@ func (c *Compactor) compactUser(ctx context.Context, userID string) error {
fetcher,
deduplicateBlocksFilter,
ignoreDeletionMarkFilter,
c.compactorCfg.CompactionInterval,
)
if err != nil {
return errors.Wrap(err, "failed to create syncer")
Expand Down
2 changes: 1 addition & 1 deletion pkg/querier/blocks_store_balanced_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (s *blocksStoreBalancedSet) starting(ctx context.Context) error {
}

func (s *blocksStoreBalancedSet) resolve(ctx context.Context) error {
if err := s.dnsProvider.Resolve(ctx, s.serviceAddresses); err != nil {
if err := s.dnsProvider.Resolve(ctx, s.serviceAddresses, true); err != nil {
level.Error(s.logger).Log("msg", "failed to resolve store-gateway addresses", "err", err, "addresses", s.serviceAddresses)
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/ring/bench/ring_memberlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type dnsProviderMock struct {
resolved []string
}

func (p *dnsProviderMock) Resolve(ctx context.Context, addrs []string) error {
func (p *dnsProviderMock) Resolve(ctx context.Context, addrs []string, flushOld bool) error {
p.resolved = addrs
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ring/kv/memberlist/dnsprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
type DNSProvider interface {
// Resolve stores a list of provided addresses or their DNS records if requested.
// Implementations may have specific ways of interpreting addresses.
Resolve(ctx context.Context, addrs []string) error
Resolve(ctx context.Context, addrs []string, flushOld bool) error

// Addresses returns the latest addresses present in the DNSProvider.
Addresses() []string
Expand Down
2 changes: 1 addition & 1 deletion pkg/ring/kv/memberlist/memberlist_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ func (m *KV) discoverMembers(ctx context.Context, members []string) []string {
}
}

err := m.provider.Resolve(ctx, resolve)
err := m.provider.Resolve(ctx, resolve, true)
if err != nil {
level.Error(m.logger).Log("msg", "failed to resolve members", "addrs", strings.Join(resolve, ","))
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/ring/kv/memberlist/memberlist_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ type dnsProviderMock struct {
resolved []string
}

func (p *dnsProviderMock) Resolve(ctx context.Context, addrs []string) error {
func (p *dnsProviderMock) Resolve(ctx context.Context, addrs []string, flushOld bool) error {
p.resolved = addrs
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/thanos-io/thanos/pkg/cache/groupcache.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/github.com/thanos-io/thanos/pkg/clientconfig/http.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions vendor/github.com/thanos-io/thanos/pkg/compact/compact.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 25 additions & 11 deletions vendor/github.com/thanos-io/thanos/pkg/discovery/dns/grpc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions vendor/github.com/thanos-io/thanos/pkg/discovery/dns/provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 1 addition & 10 deletions vendor/github.com/thanos-io/thanos/pkg/extpromql/parser.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 78a9e35

Please sign in to comment.