Don't call runtime.GC() after compaction (#8276)
Signed-off-by: Ganesh Vernekar <cs15btech11018@iith.ac.in>
This commit is contained in:
parent
caa173d2aa
commit
faa1554aa1
|
@ -22,7 +22,6 @@ import (
|
||||||
"math"
|
"math"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -875,7 +874,6 @@ func (db *DB) compactHead(head *RangeHead) error {
|
||||||
return errors.Wrap(err, "persist head block")
|
return errors.Wrap(err, "persist head block")
|
||||||
}
|
}
|
||||||
|
|
||||||
runtime.GC()
|
|
||||||
if err := db.reloadBlocks(); err != nil {
|
if err := db.reloadBlocks(); err != nil {
|
||||||
if errRemoveAll := os.RemoveAll(filepath.Join(db.dir, uid.String())); errRemoveAll != nil {
|
if errRemoveAll := os.RemoveAll(filepath.Join(db.dir, uid.String())); errRemoveAll != nil {
|
||||||
return tsdb_errors.NewMulti(
|
return tsdb_errors.NewMulti(
|
||||||
|
@ -888,7 +886,6 @@ func (db *DB) compactHead(head *RangeHead) error {
|
||||||
if err = db.head.truncateMemory(head.BlockMaxTime()); err != nil {
|
if err = db.head.truncateMemory(head.BlockMaxTime()); err != nil {
|
||||||
return errors.Wrap(err, "head memory truncate")
|
return errors.Wrap(err, "head memory truncate")
|
||||||
}
|
}
|
||||||
runtime.GC()
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -915,7 +912,6 @@ func (db *DB) compactBlocks() (err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrapf(err, "compact %s", plan)
|
return errors.Wrapf(err, "compact %s", plan)
|
||||||
}
|
}
|
||||||
runtime.GC()
|
|
||||||
|
|
||||||
if err := db.reloadBlocks(); err != nil {
|
if err := db.reloadBlocks(); err != nil {
|
||||||
if err := os.RemoveAll(filepath.Join(db.dir, uid.String())); err != nil {
|
if err := os.RemoveAll(filepath.Join(db.dir, uid.String())); err != nil {
|
||||||
|
@ -923,7 +919,6 @@ func (db *DB) compactBlocks() (err error) {
|
||||||
}
|
}
|
||||||
return errors.Wrap(err, "reloadBlocks blocks")
|
return errors.Wrap(err, "reloadBlocks blocks")
|
||||||
}
|
}
|
||||||
runtime.GC()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue