Clarify that Holder Reopen requires Close to be run beforehand.

This commit is contained in:
Michael Baird 2017-08-22 15:13:21 -05:00
parent 2dfa689d71
commit f5832cda02
2 changed files with 3 additions and 4 deletions

View file

@ -27,6 +27,7 @@ import (
"io/ioutil"
"log"
"net/http"
// Imported for its side-effect of registering pprof endpoints with the server.
_ "net/http/pprof"
"os"
"runtime/debug"
@ -43,6 +44,7 @@ import (
"unicode"
// Allow building Pilosa without the web UI.
_ "github.com/pilosa/pilosa/statik"
"github.com/rakyll/statik/fs"
)

View file

@ -44,11 +44,8 @@ func (h *Holder) Close() error {
}
// Reopen closes the holder and instantiates and opens a new holder.
// note that the hold most be Closed first
func (h *Holder) Reopen() error {
// if err := h.Holder.Close(); err != nil {
// return err
// }
path, logOutput := h.Path, h.Holder.LogOutput
h.Holder = pilosa.NewHolder()
h.Holder.Path = path