lib/{storage,mergeset}: log the duration for flushing in-memory parts on graceful shutdown

This commit is contained in:
Aliaksandr Valialkin 2022-12-05 21:30:48 -08:00
parent eed32b368c
commit d99d222f0a
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1
2 changed files with 2 additions and 4 deletions

View file

@ -374,9 +374,8 @@ func (tb *Table) MustClose() {
logger.Infof("flushing inmemory parts to files on %q...", tb.path)
startTime = time.Now()
// Flush inmemory items the last time before exit.
tb.flushInmemoryItems()
logger.Infof("inmemory parts have been successfully flushed to files in %.3f seconds at %q", time.Since(startTime).Seconds(), tb.path)
logger.Infof("waiting for flush callback worker to stop on %q...", tb.path)
startTime = time.Now()

View file

@ -722,9 +722,8 @@ func (pt *partition) MustClose() {
logger.Infof("flushing inmemory parts to files on %q...", pt.smallPartsPath)
startTime = time.Now()
// Flush inmemory rows the last time before exit.
pt.flushInmemoryRows()
logger.Infof("inmemory parts have been flushed to files in %.3f seconds on %q", time.Since(startTime).Seconds(), pt.smallPartsPath)
// Remove references from inmemoryParts, smallParts and bigParts, so they may be eventually closed
// after all the searches are done.