code: func (db *DB) Close() error {
  	close(db.stopc)
  	db.compactCancel()
  	<-db.donec
  
  	db.mtx.Lock()
  	defer db.mtx.Unlock()
  
  	var g errgroup.Group
  
  	// blocks also contains all head blocks.
  	for _, pb := range db.blocks {
  		g.Go(pb.Close)
  	}
  
  	var merr tsdb_errors.MultiError
  
  	merr.Add(g.Wait())
  
  	if db.lockf != nil {
  		merr.Add(db.lockf.Release())
  	}
  	merr.Add(db.head.Close())
  	return merr.Err()
  }
docs: // Close the partition.