Skip to content

Commit

Permalink
remove pebbledb tag
Browse files Browse the repository at this point in the history
  • Loading branch information
melekes committed Sep 19, 2024
1 parent 08726f1 commit 42ec7cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ linters-settings:
- "!$test"
allow:
- $gostd
- github.com/cockroachdb/pebble
- github.com/google/btree
test:
files:
Expand Down
18 changes: 3 additions & 15 deletions pebble.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build pebbledb
// +build pebbledb

package db

import (
Expand Down Expand Up @@ -113,23 +110,15 @@ func (db *PebbleDB) Delete(key []byte) error {
}

wopts := pebble.NoSync
err := db.db.Delete(key, wopts)
if err != nil {
return err
}
return nil
return db.db.Delete(key, wopts)
}

// DeleteSync implements DB.
func (db PebbleDB) DeleteSync(key []byte) error {
if len(key) == 0 {
return errKeyEmpty
}
err := db.db.Delete(key, pebble.Sync)
if err != nil {
return nil
}
return nil
return db.db.Delete(key, pebble.Sync)
}

func (db *PebbleDB) DB() *pebble.DB {
Expand Down Expand Up @@ -160,8 +149,7 @@ func (db *PebbleDB) Compact(start, end []byte) (err error) {
if end == nil && iter.Last() {
end = append(end, iter.Key()...)
}
err = db.db.Compact(start, end, true)
return
return db.db.Compact(start, end, true)
}

// Close implements DB.
Expand Down
3 changes: 0 additions & 3 deletions pebble_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build pebbledb
// +build pebbledb

package db

import (
Expand Down

0 comments on commit 42ec7cd

Please sign in to comment.