Change locking error message

This commit is contained in:
James Mills
2019-03-14 21:27:16 +10:00
parent b6c212d60c
commit bc8f6c6718
2 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ import (
var (
ErrKeyNotFound = errors.New("error: key not found")
ErrCannotAcquireLock = errors.New("error: cannot acquire lock")
ErrDatabaseLocked = errors.New("error: database locked")
)
type Bitcask struct {
@@ -336,7 +336,7 @@ func Open(path string, options ...func(*Bitcask) error) (*Bitcask, error) {
}
if !locked {
return nil, ErrCannotAcquireLock
return nil, ErrDatabaseLocked
}
return bitcask, nil