Skip to content

Commit

Permalink
switch to bbolt (blevesearch#1134)
Browse files Browse the repository at this point in the history
switch to use github.com/etcd-io/bbolt
in upsidedown test, close reader before closing index
  • Loading branch information
mschoch authored Feb 14, 2019
1 parent 11e55f6 commit 326f90d
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index/scorch/persister.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"github.com/blevesearch/bleve/index"
"github.com/blevesearch/bleve/index/scorch/segment"
"github.com/blevesearch/bleve/index/scorch/segment/zap"
"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

var DefaultChunkFactor uint32 = 1024
Expand Down
2 changes: 1 addition & 1 deletion index/scorch/scorch.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"github.com/blevesearch/bleve/index/scorch/segment/zap"
"github.com/blevesearch/bleve/index/store"
"github.com/blevesearch/bleve/registry"
"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

const Name = "scorch"
Expand Down
2 changes: 1 addition & 1 deletion index/scorch/snapshot_rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"log"

"github.com/blevesearch/bleve/index/scorch/segment"
"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

type RollbackPoint struct {
Expand Down
2 changes: 1 addition & 1 deletion index/store/boltdb/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package boltdb
import (
"bytes"

"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

type Iterator struct {
Expand Down
2 changes: 1 addition & 1 deletion index/store/boltdb/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package boltdb

import (
"github.com/blevesearch/bleve/index/store"
"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

type Reader struct {
Expand Down
2 changes: 1 addition & 1 deletion index/store/boltdb/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import (

"github.com/blevesearch/bleve/index/store"
"github.com/blevesearch/bleve/registry"
"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion index/store/boltdb/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/blevesearch/bleve/index/store"
"github.com/blevesearch/bleve/index/store/test"
"github.com/boltdb/bolt"
bolt "github.com/etcd-io/bbolt"
)

func open(t *testing.T, mo store.MergeOperator) store.KVStore {
Expand Down
5 changes: 5 additions & 0 deletions index/upsidedown/upsidedown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,11 @@ func TestConcurrentUpdate(t *testing.T) {
if len(doc.Fields) > 1 {
t.Errorf("expected single field, found %d", len(doc.Fields))
}

err = r.Close()
if err != nil {
t.Fatal(err)
}
}

func TestLargeField(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions vendor/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"notests": true
},
{
"importpath": "github.com/boltdb/bolt",
"repository": "https://github.com/boltdb/bolt",
"importpath": "github.com/etcd-io/bbolt",
"repository": "https://github.com/etcd-io/bbolt",
"vcs": "",
"revision": "9da31745363232bc1e27dbab3569e77383a51585",
"revision": "7ee3ded59d4835e10f3e7d0f7603c42aa5e83820",
"branch": "master",
"notests": true
},
Expand Down

0 comments on commit 326f90d

Please sign in to comment.