clean the region cache
This commit is contained in:
parent
787bd7ae07
commit
19a8816827
|
|
@ -93,6 +93,8 @@ func Bench(sCmd string) {
|
||||||
defer handle.Close()
|
defer handle.Close()
|
||||||
|
|
||||||
var rgCache = xdb.NewRegionCache()
|
var rgCache = xdb.NewRegionCache()
|
||||||
|
defer rgCache.Clean()
|
||||||
|
|
||||||
var count, errCount, tStart = 0, 0, time.Now()
|
var count, errCount, tStart = 0, 0, time.Now()
|
||||||
slog.Info("Bench start", "xdbPath", dbFile, "srcPath", srcFile)
|
slog.Info("Bench start", "xdbPath", dbFile, "srcPath", srcFile)
|
||||||
_, _, iErr := xdb.IterateSegments(handle, false, func(l string) {
|
_, _, iErr := xdb.IterateSegments(handle, false, func(l string) {
|
||||||
|
|
|
||||||
|
|
@ -416,4 +416,5 @@ func (e *Editor) SaveToFile(dstFile string) error {
|
||||||
|
|
||||||
func (e *Editor) Close() {
|
func (e *Editor) Close() {
|
||||||
_ = e.srcHandle.Close()
|
_ = e.srcHandle.Close()
|
||||||
|
e.rgCache.Clean()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -414,5 +414,7 @@ func (m *Maker) End() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m.regionCache.Clean()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,5 +156,7 @@ func (p *Processor) End() error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p.rgCache.Clean()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue