0
0

+ correctly copy bytes from the goleveldb store

- this is part of a recent bleve KVStore API change.

    See the following two google group threads for more details:

    * [help adding goleveldb as an alternative Key/Value store for bleve][1]
    * [bleve search performance improvement][2]

    [1]: https://groups.google.com/forum/#!topic/bleve/aHZ8gmihLiY
    [2]: https://groups.google.com/forum/#!topic/bleve/aTyqsSnbhik
This commit is contained in:
indraniel 2015-04-10 11:25:23 -05:00
parent 81bef38cce
commit 54ab493b3e
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,10 @@ func newReader(store *Store) (*Reader, error) {
}, nil
}
func (r *Reader) BytesSafeAfterClose() bool {
return true
}
func (r *Reader) Get(key []byte) ([]byte, error) {
return r.store.getWithSnapshot(key, r.snapshot)
}

View File

@ -24,6 +24,10 @@ func newWriter(store *Store) (*Writer, error) {
}, nil
}
func (w *Writer) BytesSafeAfterClose() bool {
return false
}
func (w *Writer) Set(key, val []byte) error {
return w.store.setlocked(key, val)
}