Skip to content
This repository was archived by the owner on Jul 19, 2023. It is now read-only.

Commit effebc0

Browse files
authored
Merge pull request #350 from grafana/fix-panic-pool
Make sure we only put back to VT pool once
2 parents 42afb63 + 8d2652f commit effebc0

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

pkg/ingester/ingester.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ func (i *ingesterFlusherCompat) Flush() {
6969
}
7070

7171
func New(phlarectx context.Context, cfg Config, dbConfig phlaredb.Config, storageBucket phlareobjstore.Bucket) (*Ingester, error) {
72-
7372
i := &Ingester{
7473
cfg: cfg,
7574
phlarectx: phlarectx,

pkg/pprof/pprof.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func OpenFile(path string) (*Profile, error) {
120120

121121
type Profile struct {
122122
*profilev1.Profile
123-
//raw []byte
123+
// raw []byte
124124
buf *bytes.Buffer
125125

126126
hasher StacktracesHasher
@@ -148,9 +148,6 @@ func (p *Profile) WriteTo(w io.Writer) (int64, error) {
148148
}
149149
data = data[:n]
150150

151-
p.ReturnToVTPool()
152-
data = data[:n]
153-
154151
gzipWriter := gzipWriterPool.Get().(*gzip.Writer)
155152
gzipWriter.Reset(w)
156153
defer func() {

0 commit comments

Comments
 (0)