mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 07:41:02 +00:00
differentiate error messages between opening file and mapping it
This commit is contained in:
parent
54a4c2a587
commit
207634aea3
1 changed files with 1 additions and 1 deletions
|
|
@ -164,7 +164,7 @@ func (db *DB) openWAL() (err error) {
|
|||
return fmt.Errorf("open wal mmap file: %w", err)
|
||||
} else if db.wal, err = syswrap.Mmap(int(f.Fd()), 0, int(db.cfg.MaxWALSize), syscall.PROT_READ, syscall.MAP_SHARED); err != nil {
|
||||
f.Close()
|
||||
return fmt.Errorf("open wal mmap file: %w", err)
|
||||
return fmt.Errorf("map wal mmap file: %w", err)
|
||||
} else if err := f.Close(); err != nil {
|
||||
return fmt.Errorf("cannot close wal mmap file: %w", err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue