Browse Source

switch to bbolt (#1134)

switch to use github.com/etcd-io/bbolt
in upsidedown test, close reader before closing index
Marty Schoch 4 months ago
parent
commit
326f90d860

+ 1 - 1
index/scorch/persister.go

@@ -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

+ 1 - 1
index/scorch/scorch.go

@@ -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"

+ 1 - 1
index/scorch/snapshot_rollback.go

@@ -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 {

+ 1 - 1
index/store/boltdb/iterator.go

@@ -17,7 +17,7 @@ package boltdb
 import (
 	"bytes"
 
-	"github.com/boltdb/bolt"
+	bolt "github.com/etcd-io/bbolt"
 )
 
 type Iterator struct {

+ 1 - 1
index/store/boltdb/reader.go

@@ -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 {

+ 1 - 1
index/store/boltdb/store.go

@@ -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 (

+ 1 - 1
index/store/boltdb/store_test.go

@@ -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 {

+ 5 - 0
index/upsidedown/upsidedown_test.go

@@ -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) {

+ 3 - 3
vendor/manifest

@@ -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
 		},