File tree Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Expand file tree Collapse file tree 2 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
1010
1111## Unreleased
1212
13+ ### Fixed
14+
15+ - [ #8254 ] ( https://github.com/thanos-io/thanos/issues/8254 ) Receive: Endless loop of retried replication with capnproto and distributors
16+
1317## [ v0.40.0] ( https://github.com/thanos-io/thanos/tree/release-0.40 ) - 2025 10 20 (in progress)
1418
1519### Fixed
@@ -22,22 +26,21 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re
2226
2327- [ #8366 ] ( https://github.com/thanos-io/thanos/pull/8366 ) Store: optionally ignore Parquet migrated blocks
2428- [ #8359 ] ( https://github.com/thanos-io/thanos/pull/8359 ) Tools: add ` --shipper.upload-compacted ` flag for uploading compacted blocks to bucket upload-blocks
25- - [ #8484 ] ( https://github.com/thanos-io/thanos/pull/8484 ) Query: add ` /api/v1/status/tsdb ` API endpoint.
2629
2730### Changed
2831
2932- [ #8370 ] ( https://github.com/thanos-io/thanos/pull/8370 ) Query: announced labelset now reflects relabel-config
3033
3134### Removed
3235
33- ## [ v0.39.2] ( https://github.com/thanos-io/thanos/tree/release-0.39 ) - 2025 07 17
36+ ### [ v0.39.2] ( https://github.com/thanos-io/thanos/tree/release-0.39 ) - 2025 07 17
3437
3538### Fixed
3639
3740- [ #8374 ] ( https://github.com/thanos-io/thanos/pull/8374 ) Query: fix panic when concurrently accessing annotations map
3841- [ #8375 ] ( https://github.com/thanos-io/thanos/pull/8375 ) Query: fix native histogram buckets in distributed queries
3942
40- ## [ v0.39.1] ( https://github.com/thanos-io/thanos/tree/release-0.39 ) - 2025 07 01
43+ ### [ v0.39.1] ( https://github.com/thanos-io/thanos/tree/release-0.39 ) - 2025 07 01
4144
4245Fixes a memory leak issue on query-frontend. The bug only affects v0.39.0.
4346
Original file line number Diff line number Diff line change @@ -109,6 +109,15 @@ func (r *RemoteWriteClient) connect(ctx context.Context) error {
109109 r .mu .Lock ()
110110 defer r .mu .Unlock ()
111111 if r .conn != nil {
112+ s := capnp .Client (r .writer ).State ()
113+ if ! s .IsPromise {
114+ if err , ok := s .Brand .Value .(error ); ok {
115+ // If bootstrap failed, close the connection to force a reconnect.
116+ r .closeUnlocked ()
117+ return errors .Wrap (err , "client in error state" )
118+ }
119+ }
120+
112121 return nil
113122 }
114123
@@ -123,11 +132,15 @@ func (r *RemoteWriteClient) connect(ctx context.Context) error {
123132
124133func (r * RemoteWriteClient ) Close () error {
125134 r .mu .Lock ()
135+ r .closeUnlocked ()
136+ r .mu .Unlock ()
137+ return nil
138+ }
139+
140+ func (r * RemoteWriteClient ) closeUnlocked () {
126141 if r .conn != nil {
127142 conn := r .conn
128143 r .conn = nil
129144 go conn .Close ()
130145 }
131- r .mu .Unlock ()
132- return nil
133146}
You can’t perform that action at this time.
0 commit comments