mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 15:00:40 +00:00
update vendor
This commit is contained in:
16
vendor/github.com/couchbase/go-couchbase/client.go
generated
vendored
16
vendor/github.com/couchbase/go-couchbase/client.go
generated
vendored
@ -129,17 +129,20 @@ func (b *Bucket) Do(k string, f func(mc *memcached.Client, vb uint16) error) (er
|
||||
err = f(conn, uint16(vb))
|
||||
}
|
||||
|
||||
var st gomemcached.Status
|
||||
var retry bool
|
||||
discard := isOutOfBoundsError(err)
|
||||
|
||||
// MB-30967 / MB-31001 implement back off for transient errors
|
||||
if i, ok := err.(*gomemcached.MCResponse); ok {
|
||||
st = i.Status
|
||||
switch st {
|
||||
switch i.Status {
|
||||
case gomemcached.NOT_MY_VBUCKET:
|
||||
b.Refresh()
|
||||
// MB-28842: in case of NMVB, check if the node is still part of the map
|
||||
// and ditch the connection if it isn't.
|
||||
discard = b.checkVBmap(pool.Node())
|
||||
retry = true
|
||||
case gomemcached.NOT_SUPPORTED:
|
||||
discard = true
|
||||
retry = true
|
||||
case gomemcached.ENOMEM:
|
||||
fallthrough
|
||||
@ -151,9 +154,7 @@ func (b *Bucket) Do(k string, f func(mc *memcached.Client, vb uint16) error) (er
|
||||
}
|
||||
}
|
||||
|
||||
// MB-28842: in case of NMVB, check if the node is still part of the map
|
||||
// and ditch the connection if it isn't.
|
||||
if st == gomemcached.NOT_MY_VBUCKET && b.checkVBmap(pool.Node()) {
|
||||
if discard {
|
||||
pool.Discard(conn)
|
||||
} else {
|
||||
pool.Return(conn)
|
||||
@ -338,7 +339,7 @@ func isConnError(err error) bool {
|
||||
}
|
||||
|
||||
func isOutOfBoundsError(err error) bool {
|
||||
return strings.Contains(err.Error(), "Out of Bounds error")
|
||||
return err != nil && strings.Contains(err.Error(), "Out of Bounds error")
|
||||
|
||||
}
|
||||
|
||||
@ -459,6 +460,7 @@ func (b *Bucket) doBulkGet(vb uint16, keys []string, reqDeadline time.Time,
|
||||
case error:
|
||||
if isOutOfBoundsError(err) {
|
||||
// We got an out of bound error, retry the operation
|
||||
discard = true
|
||||
return nil
|
||||
} else if isConnError(err) && backOff(backOffAttempts, MaxBackOffRetries, backOffDuration, true) {
|
||||
backOffAttempts++
|
||||
|
10
vendor/github.com/couchbase/gomemcached/client/mc.go
generated
vendored
10
vendor/github.com/couchbase/gomemcached/client/mc.go
generated
vendored
@ -581,7 +581,9 @@ func (c *Client) GetBulk(vb uint16, keys []string, rv map[string]*gomemcached.MC
|
||||
return
|
||||
}
|
||||
// continue receiving in case of KEY_ENOENT
|
||||
} else if res.Opcode == gomemcached.GET {
|
||||
} else if res.Opcode == gomemcached.GET ||
|
||||
res.Opcode == gomemcached.SUBDOC_GET ||
|
||||
res.Opcode == gomemcached.SUBDOC_MULTI_LOOKUP {
|
||||
opaque := res.Opaque - opStart
|
||||
if opaque < 0 || opaque >= uint32(len(keys)) {
|
||||
// Every now and then we seem to be seeing an invalid opaque
|
||||
@ -598,12 +600,6 @@ func (c *Client) GetBulk(vb uint16, keys []string, rv map[string]*gomemcached.MC
|
||||
if res.Opcode == gomemcached.NOOP {
|
||||
ok = false
|
||||
}
|
||||
|
||||
if res.Opcode == gomemcached.SUBDOC_GET || res.Opcode == gomemcached.SUBDOC_MULTI_LOOKUP {
|
||||
opaque := res.Opaque - opStart
|
||||
rv[keys[opaque]] = res
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
9
vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go
generated
vendored
9
vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go
generated
vendored
@ -663,7 +663,7 @@ type cCmd interface {
|
||||
}
|
||||
|
||||
type cAuto struct {
|
||||
// Note for table compaction, an empty ackC represents it's a compaction waiting command.
|
||||
// Note for table compaction, an non-empty ackC represents it's a compaction waiting command.
|
||||
ackC chan<- error
|
||||
}
|
||||
|
||||
@ -844,7 +844,12 @@ func (db *DB) tCompaction() {
|
||||
switch cmd := x.(type) {
|
||||
case cAuto:
|
||||
if cmd.ackC != nil {
|
||||
waitQ = append(waitQ, x)
|
||||
// Check the write pause state before caching it.
|
||||
if db.resumeWrite() {
|
||||
x.ack(nil)
|
||||
} else {
|
||||
waitQ = append(waitQ, x)
|
||||
}
|
||||
} else {
|
||||
ackQ = append(ackQ, x)
|
||||
}
|
||||
|
13
vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go
generated
vendored
13
vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go
generated
vendored
@ -158,6 +158,12 @@ type Options struct {
|
||||
// The default value is 8MiB.
|
||||
BlockCacheCapacity int
|
||||
|
||||
// BlockCacheEvictRemoved allows enable forced-eviction on cached block belonging
|
||||
// to removed 'sorted table'.
|
||||
//
|
||||
// The default if false.
|
||||
BlockCacheEvictRemoved bool
|
||||
|
||||
// BlockRestartInterval is the number of keys between restart points for
|
||||
// delta encoding of keys.
|
||||
//
|
||||
@ -384,6 +390,13 @@ func (o *Options) GetBlockCacheCapacity() int {
|
||||
return o.BlockCacheCapacity
|
||||
}
|
||||
|
||||
func (o *Options) GetBlockCacheEvictRemoved() bool {
|
||||
if o == nil {
|
||||
return false
|
||||
}
|
||||
return o.BlockCacheEvictRemoved
|
||||
}
|
||||
|
||||
func (o *Options) GetBlockRestartInterval() int {
|
||||
if o == nil || o.BlockRestartInterval <= 0 {
|
||||
return DefaultBlockRestartInterval
|
||||
|
24
vendor/github.com/syndtr/goleveldb/leveldb/table.go
generated
vendored
24
vendor/github.com/syndtr/goleveldb/leveldb/table.go
generated
vendored
@ -290,11 +290,12 @@ func (x *tFilesSortByNum) Less(i, j int) bool {
|
||||
|
||||
// Table operations.
|
||||
type tOps struct {
|
||||
s *session
|
||||
noSync bool
|
||||
cache *cache.Cache
|
||||
bcache *cache.Cache
|
||||
bpool *util.BufferPool
|
||||
s *session
|
||||
noSync bool
|
||||
evictRemoved bool
|
||||
cache *cache.Cache
|
||||
bcache *cache.Cache
|
||||
bpool *util.BufferPool
|
||||
}
|
||||
|
||||
// Creates an empty table and returns table writer.
|
||||
@ -422,7 +423,7 @@ func (t *tOps) remove(f *tFile) {
|
||||
} else {
|
||||
t.s.logf("table@remove removed @%d", f.fd.Num)
|
||||
}
|
||||
if t.bcache != nil {
|
||||
if t.evictRemoved && t.bcache != nil {
|
||||
t.bcache.EvictNS(uint64(f.fd.Num))
|
||||
}
|
||||
})
|
||||
@ -459,11 +460,12 @@ func newTableOps(s *session) *tOps {
|
||||
bpool = util.NewBufferPool(s.o.GetBlockSize() + 5)
|
||||
}
|
||||
return &tOps{
|
||||
s: s,
|
||||
noSync: s.o.GetNoSync(),
|
||||
cache: cache.NewCache(cacher),
|
||||
bcache: bcache,
|
||||
bpool: bpool,
|
||||
s: s,
|
||||
noSync: s.o.GetNoSync(),
|
||||
evictRemoved: s.o.GetBlockCacheEvictRemoved(),
|
||||
cache: cache.NewCache(cacher),
|
||||
bcache: bcache,
|
||||
bpool: bpool,
|
||||
}
|
||||
}
|
||||
|
||||
|
10
vendor/modules.txt
vendored
10
vendor/modules.txt
vendored
@ -21,9 +21,9 @@ github.com/casbin/casbin/util
|
||||
github.com/casbin/casbin/config
|
||||
# github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58
|
||||
github.com/cloudflare/golz4
|
||||
# github.com/couchbase/go-couchbase v0.0.0-20181019154153-595f46701cbc
|
||||
# github.com/couchbase/go-couchbase v0.0.0-20181122212707-3e9b6e1258bb
|
||||
github.com/couchbase/go-couchbase
|
||||
# github.com/couchbase/gomemcached v0.0.0-20180723192129-20e69a1ee160
|
||||
# github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c
|
||||
github.com/couchbase/gomemcached
|
||||
github.com/couchbase/gomemcached/client
|
||||
# github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a
|
||||
@ -35,7 +35,7 @@ github.com/cupcake/rdb/nopdecoder
|
||||
github.com/cupcake/rdb/crc64
|
||||
# github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712
|
||||
github.com/edsrzf/mmap-go
|
||||
# github.com/elazarl/go-bindata-assetfs v0.0.0-20180223110309-38087fe4dafb
|
||||
# github.com/elazarl/go-bindata-assetfs v1.0.0
|
||||
github.com/elazarl/go-bindata-assetfs
|
||||
# github.com/go-redis/redis v6.14.2+incompatible
|
||||
github.com/go-redis/redis
|
||||
@ -85,7 +85,7 @@ github.com/siddontang/ledisdb/store/rocksdb
|
||||
github.com/siddontang/rdb
|
||||
# github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec
|
||||
github.com/ssdb/gossdb/ssdb
|
||||
# github.com/syndtr/goleveldb v0.0.0-20181105012736-f9080354173f
|
||||
# github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c
|
||||
github.com/syndtr/goleveldb/leveldb
|
||||
github.com/syndtr/goleveldb/leveldb/cache
|
||||
github.com/syndtr/goleveldb/leveldb/filter
|
||||
@ -100,7 +100,7 @@ github.com/syndtr/goleveldb/leveldb/memdb
|
||||
github.com/syndtr/goleveldb/leveldb/table
|
||||
# github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b
|
||||
github.com/wendal/errors
|
||||
# golang.org/x/crypto v0.0.0-20181112202954-3d3f9f413869
|
||||
# golang.org/x/crypto v0.0.0-20181126163421-e657309f52e7
|
||||
golang.org/x/crypto/acme/autocert
|
||||
golang.org/x/crypto/acme
|
||||
golang.org/x/crypto/pbkdf2
|
||||
|
Reference in New Issue
Block a user