+ 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:
parent
81bef38cce
commit
54ab493b3e
@ -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)
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user