Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaut committed Dec 18, 2015
1 parent 32684c0 commit e331d35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
9 changes: 9 additions & 0 deletions kv/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,12 @@ func IsRetryableError(err error) bool {

return false
}

// IsErrNotFound checks if err is a kind of NotFound error.
func IsErrNotFound(err error) bool {
if terror.ErrorEqual(err, ErrNotExist) {
return true
}

return false
}
10 changes: 0 additions & 10 deletions kv/union_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"github.com/juju/errors"
"github.com/ngaut/pool"
"github.com/pingcap/tidb/terror"
)

// UnionStore is a store that wraps a snapshot for read and a BufferStore for buffered write.
Expand Down Expand Up @@ -64,15 +63,6 @@ var (
})
)

// IsErrNotFound checks if err is a kind of NotFound error.
func IsErrNotFound(err error) bool {
if terror.ErrorEqual(err, ErrNotExist) {
return true
}

return false
}

// UnionStore is an in-memory Store which contains a buffer for write and a
// snapshot for read.
type unionStore struct {
Expand Down

0 comments on commit e331d35

Please sign in to comment.