mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
ensure that we've unrequested mapping when applying empty storage
This commit is contained in:
parent
337e451cc7
commit
99d865c2ea
1 changed files with 3 additions and 0 deletions
|
|
@ -294,6 +294,9 @@ func (f *fragment) importStorage(data []byte, file *os.File, newGen generation,
|
|||
// to use a new storage as backing store.
|
||||
func (f *fragment) applyStorage(data []byte, file *os.File, newGen generation, mapped bool) (bool, error) {
|
||||
if len(data) == 0 {
|
||||
// This shouldn't be used anyway in this path, but just in
|
||||
// case, we'll be explicit about it.
|
||||
f.storage.PreferMapping(false)
|
||||
if file != nil {
|
||||
fi, err := file.Stat()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue