diff options
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 5 | ||||
-rw-r--r-- | vendor/gitea.com/lunny/levelqueue/go.mod | 3 | ||||
-rw-r--r-- | vendor/gitea.com/lunny/levelqueue/go.sum | 4 | ||||
-rw-r--r-- | vendor/gitea.com/lunny/levelqueue/queue.go | 9 | ||||
-rw-r--r-- | vendor/gitea.com/lunny/levelqueue/set.go | 9 | ||||
-rw-r--r-- | vendor/gitea.com/lunny/levelqueue/uniquequeue.go | 9 | ||||
-rw-r--r-- | vendor/modules.txt | 2 |
8 files changed, 34 insertions, 9 deletions
@@ -5,7 +5,7 @@ go 1.14 require ( cloud.google.com/go v0.45.0 // indirect gitea.com/jolheiser/gitea-vet v0.1.0 - gitea.com/lunny/levelqueue v0.2.0 + gitea.com/lunny/levelqueue v0.3.0 gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76 gitea.com/macaron/captcha v0.0.0-20190822015246-daa973478bae @@ -11,8 +11,8 @@ cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbf cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= gitea.com/jolheiser/gitea-vet v0.1.0 h1:gJEms9YWbIcrPOEmDOJ+5JZXCYFxNpwxlI73uRulAi4= gitea.com/jolheiser/gitea-vet v0.1.0/go.mod h1:2Oa6TAdEp1N/38oBNh3ZeiSEER60D/CeDaBFv2sdH58= -gitea.com/lunny/levelqueue v0.2.0 h1:lR/5EAwQtFcn5YvPEkNMw0p9pAy2/O2nSP5ImECLA2E= -gitea.com/lunny/levelqueue v0.2.0/go.mod h1:G7hVb908t0Bl0uk7zGSg14fyzNtxgtD9Shf04wkMK7s= +gitea.com/lunny/levelqueue v0.3.0 h1:MHn1GuSZkxvVEDMyAPqlc7A3cOW+q8RcGhRgH/xtm6I= +gitea.com/lunny/levelqueue v0.3.0/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU= gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b h1:vXt85uYV17KURaUlhU7v4GbCShkqRZDSfo0TkC0YCjQ= gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b/go.mod h1:Cxadig6POWpPYYSfg23E7jo35Yf0yvsdC1lifoKWmPo= gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76 h1:mMsMEg90c5KXQgRWsH8D6GHXfZIW1RAe5S9VYIb12lM= @@ -588,7 +588,6 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tecbot/gorocksdb v0.0.0-20181010114359-8752a9433481 h1:HOxvxvnntLiPn123Fk+twfUhCQdMDaqmb0cclArW0T0= diff --git a/vendor/gitea.com/lunny/levelqueue/go.mod b/vendor/gitea.com/lunny/levelqueue/go.mod index 8b3e56518f..00509b77df 100644 --- a/vendor/gitea.com/lunny/levelqueue/go.mod +++ b/vendor/gitea.com/lunny/levelqueue/go.mod @@ -1,8 +1,9 @@ module gitea.com/lunny/levelqueue require ( + github.com/golang/snappy v0.0.1 // indirect github.com/stretchr/testify v1.3.0 - github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66 + github.com/syndtr/goleveldb v1.0.0 ) go 1.13 diff --git a/vendor/gitea.com/lunny/levelqueue/go.sum b/vendor/gitea.com/lunny/levelqueue/go.sum index 7ae1873381..b0d27906a6 100644 --- a/vendor/gitea.com/lunny/levelqueue/go.sum +++ b/vendor/gitea.com/lunny/levelqueue/go.sum @@ -6,6 +6,8 @@ github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -20,6 +22,8 @@ github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66 h1:AwmkkZT+TucFotNCL+aNJ/0KCMsRtlXN9fs8uoOMSRk= github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= +github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= diff --git a/vendor/gitea.com/lunny/levelqueue/queue.go b/vendor/gitea.com/lunny/levelqueue/queue.go index 20ed90100c..0570cc572d 100644 --- a/vendor/gitea.com/lunny/levelqueue/queue.go +++ b/vendor/gitea.com/lunny/levelqueue/queue.go @@ -10,6 +10,7 @@ import ( "sync" "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/errors" ) const ( @@ -36,7 +37,13 @@ type Queue struct { func Open(dataDir string) (*Queue, error) { db, err := leveldb.OpenFile(dataDir, nil) if err != nil { - return nil, err + if !errors.IsCorrupted(err) { + return nil, err + } + db, err = leveldb.RecoverFile(dataDir, nil) + if err != nil { + return nil, err + } } return NewQueue(db, []byte{}, true) } diff --git a/vendor/gitea.com/lunny/levelqueue/set.go b/vendor/gitea.com/lunny/levelqueue/set.go index 88f4e9b1d1..f5995cb8f1 100644 --- a/vendor/gitea.com/lunny/levelqueue/set.go +++ b/vendor/gitea.com/lunny/levelqueue/set.go @@ -8,6 +8,7 @@ import ( "sync" "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/util" ) @@ -28,7 +29,13 @@ type Set struct { func OpenSet(dataDir string) (*Set, error) { db, err := leveldb.OpenFile(dataDir, nil) if err != nil { - return nil, err + if !errors.IsCorrupted(err) { + return nil, err + } + db, err = leveldb.RecoverFile(dataDir, nil) + if err != nil { + return nil, err + } } return NewSet(db, []byte(setPrefixStr), true) } diff --git a/vendor/gitea.com/lunny/levelqueue/uniquequeue.go b/vendor/gitea.com/lunny/levelqueue/uniquequeue.go index 8d2676b0d2..a53abb2c4e 100644 --- a/vendor/gitea.com/lunny/levelqueue/uniquequeue.go +++ b/vendor/gitea.com/lunny/levelqueue/uniquequeue.go @@ -8,6 +8,7 @@ import ( "fmt" "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/errors" ) const ( @@ -27,7 +28,13 @@ type UniqueQueue struct { func OpenUnique(dataDir string) (*UniqueQueue, error) { db, err := leveldb.OpenFile(dataDir, nil) if err != nil { - return nil, err + if !errors.IsCorrupted(err) { + return nil, err + } + db, err = leveldb.RecoverFile(dataDir, nil) + if err != nil { + return nil, err + } } return NewUniqueQueue(db, []byte{}, []byte(uniqueQueuePrefixStr), true) } diff --git a/vendor/modules.txt b/vendor/modules.txt index d6d4d6c8a8..4b02d0798a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -5,7 +5,7 @@ cloud.google.com/go/compute/metadata ## explicit gitea.com/jolheiser/gitea-vet gitea.com/jolheiser/gitea-vet/checks -# gitea.com/lunny/levelqueue v0.2.0 +# gitea.com/lunny/levelqueue v0.3.0 ## explicit gitea.com/lunny/levelqueue # gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b |