mirror of
https://github.com/containers/podman.git
synced 2025-06-30 15:49:03 +08:00
Merge pull request #22611 from containers/renovate/go.etcd.io-bbolt-1.x
fix(deps): update module go.etcd.io/bbolt to v1.3.10
This commit is contained in:
2
go.mod
2
go.mod
@ -70,7 +70,7 @@ require (
|
||||
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635
|
||||
github.com/vbauerster/mpb/v8 v8.7.3
|
||||
github.com/vishvananda/netlink v1.2.1-beta.2
|
||||
go.etcd.io/bbolt v1.3.9
|
||||
go.etcd.io/bbolt v1.3.10
|
||||
golang.org/x/crypto v0.23.0
|
||||
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
|
||||
golang.org/x/net v0.25.0
|
||||
|
4
go.sum
4
go.sum
@ -648,8 +648,8 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1
|
||||
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
|
||||
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
|
||||
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
|
||||
go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
|
||||
go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
|
||||
go.etcd.io/bbolt v1.3.10 h1:+BqfJTcCzTItrop8mq/lbzL8wSGtj94UO/3U31shqG0=
|
||||
go.etcd.io/bbolt v1.3.10/go.mod h1:bK3UQLPJZly7IlNmV7uVHJDxfe5aK9Ll93e/74Y9oEQ=
|
||||
go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg=
|
||||
go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng=
|
||||
go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8=
|
||||
|
1
vendor/go.etcd.io/bbolt/.go-version
generated
vendored
Normal file
1
vendor/go.etcd.io/bbolt/.go-version
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
1.21.9
|
23
vendor/go.etcd.io/bbolt/README.md
generated
vendored
23
vendor/go.etcd.io/bbolt/README.md
generated
vendored
@ -421,10 +421,19 @@ Prev() Move to the previous key.
|
||||
```
|
||||
|
||||
Each of those functions has a return signature of `(key []byte, value []byte)`.
|
||||
When you have iterated to the end of the cursor then `Next()` will return a
|
||||
`nil` key. You must seek to a position using `First()`, `Last()`, or `Seek()`
|
||||
before calling `Next()` or `Prev()`. If you do not seek to a position then
|
||||
these functions will return a `nil` key.
|
||||
You must seek to a position using `First()`, `Last()`, or `Seek()` before calling
|
||||
`Next()` or `Prev()`. If you do not seek to a position then these functions will
|
||||
return a `nil` key.
|
||||
|
||||
When you have iterated to the end of the cursor, then `Next()` will return a
|
||||
`nil` key and the cursor still points to the last element if present. When you
|
||||
have iterated to the beginning of the cursor, then `Prev()` will return a `nil`
|
||||
key and the cursor still points to the first element if present.
|
||||
|
||||
If you remove key/value pairs during iteration, the cursor may automatically
|
||||
move to the next position if present in current node each time removing a key.
|
||||
When you call `c.Next()` after removing a key, it may skip one key/value pair.
|
||||
Refer to [pull/611](https://github.com/etcd-io/bbolt/pull/611) to get more detailed info.
|
||||
|
||||
During iteration, if the key is non-`nil` but the value is `nil`, that means
|
||||
the key refers to a bucket rather than a value. Use `Bucket.Bucket()` to
|
||||
@ -850,6 +859,12 @@ Here are a few things to note when evaluating and using Bolt:
|
||||
to grow. However, it's important to note that deleting large chunks of data
|
||||
will not allow you to reclaim that space on disk.
|
||||
|
||||
* Removing key/values pairs in a bucket during iteration on the bucket using
|
||||
cursor may not work properly. Each time when removing a key/value pair, the
|
||||
cursor may automatically move to the next position if present. When users
|
||||
call `c.Next()` after removing a key, it may skip one key/value pair.
|
||||
Refer to https://github.com/etcd-io/bbolt/pull/611 for more detailed info.
|
||||
|
||||
For more information on page allocation, [see this comment][page-allocation].
|
||||
|
||||
[page-allocation]: https://github.com/boltdb/bolt/issues/308#issuecomment-74811638
|
||||
|
11
vendor/go.etcd.io/bbolt/cursor.go
generated
vendored
11
vendor/go.etcd.io/bbolt/cursor.go
generated
vendored
@ -71,7 +71,7 @@ func (c *Cursor) Last() (key []byte, value []byte) {
|
||||
|
||||
// If this is an empty page (calling Delete may result in empty pages)
|
||||
// we call prev to find the last page that is not empty
|
||||
for len(c.stack) > 0 && c.stack[len(c.stack)-1].count() == 0 {
|
||||
for len(c.stack) > 1 && c.stack[len(c.stack)-1].count() == 0 {
|
||||
c.prev()
|
||||
}
|
||||
|
||||
@ -254,6 +254,15 @@ func (c *Cursor) prev() (key []byte, value []byte, flags uint32) {
|
||||
elem.index--
|
||||
break
|
||||
}
|
||||
// If we've hit the beginning, we should stop moving the cursor,
|
||||
// and stay at the first element, so that users can continue to
|
||||
// iterate over the elements in reverse direction by calling `Next`.
|
||||
// We should return nil in such case.
|
||||
// Refer to https://github.com/etcd-io/bbolt/issues/733
|
||||
if len(c.stack) == 1 {
|
||||
c.first()
|
||||
return nil, nil, 0
|
||||
}
|
||||
c.stack = c.stack[:i]
|
||||
}
|
||||
|
||||
|
11
vendor/go.etcd.io/bbolt/freelist.go
generated
vendored
11
vendor/go.etcd.io/bbolt/freelist.go
generated
vendored
@ -282,9 +282,8 @@ func (f *freelist) read(p *page) {
|
||||
if count == 0 {
|
||||
f.ids = nil
|
||||
} else {
|
||||
var ids []pgid
|
||||
data := unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), unsafe.Sizeof(ids[0]), idx)
|
||||
unsafeSlice(unsafe.Pointer(&ids), data, count)
|
||||
data := unsafeIndex(unsafe.Pointer(p), unsafe.Sizeof(*p), unsafe.Sizeof(pgid(0)), idx)
|
||||
ids := unsafe.Slice((*pgid)(data), count)
|
||||
|
||||
// copy the ids, so we don't modify on the freelist page directly
|
||||
idsCopy := make([]pgid, count)
|
||||
@ -322,15 +321,13 @@ func (f *freelist) write(p *page) error {
|
||||
p.count = uint16(l)
|
||||
} else if l < 0xFFFF {
|
||||
p.count = uint16(l)
|
||||
var ids []pgid
|
||||
data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))
|
||||
unsafeSlice(unsafe.Pointer(&ids), data, l)
|
||||
ids := unsafe.Slice((*pgid)(data), l)
|
||||
f.copyall(ids)
|
||||
} else {
|
||||
p.count = 0xFFFF
|
||||
var ids []pgid
|
||||
data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))
|
||||
unsafeSlice(unsafe.Pointer(&ids), data, l+1)
|
||||
ids := unsafe.Slice((*pgid)(data), l+1)
|
||||
ids[0] = pgid(l)
|
||||
f.copyall(ids[1:])
|
||||
}
|
||||
|
6
vendor/go.etcd.io/bbolt/page.go
generated
vendored
6
vendor/go.etcd.io/bbolt/page.go
generated
vendored
@ -74,9 +74,8 @@ func (p *page) leafPageElements() []leafPageElement {
|
||||
if p.count == 0 {
|
||||
return nil
|
||||
}
|
||||
var elems []leafPageElement
|
||||
data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))
|
||||
unsafeSlice(unsafe.Pointer(&elems), data, int(p.count))
|
||||
elems := unsafe.Slice((*leafPageElement)(data), int(p.count))
|
||||
return elems
|
||||
}
|
||||
|
||||
@ -91,9 +90,8 @@ func (p *page) branchPageElements() []branchPageElement {
|
||||
if p.count == 0 {
|
||||
return nil
|
||||
}
|
||||
var elems []branchPageElement
|
||||
data := unsafeAdd(unsafe.Pointer(p), unsafe.Sizeof(*p))
|
||||
unsafeSlice(unsafe.Pointer(&elems), data, int(p.count))
|
||||
elems := unsafe.Slice((*branchPageElement)(data), int(p.count))
|
||||
return elems
|
||||
}
|
||||
|
||||
|
12
vendor/go.etcd.io/bbolt/unsafe.go
generated
vendored
12
vendor/go.etcd.io/bbolt/unsafe.go
generated
vendored
@ -1,7 +1,6 @@
|
||||
package bbolt
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
@ -26,14 +25,3 @@ func unsafeByteSlice(base unsafe.Pointer, offset uintptr, i, j int) []byte {
|
||||
// all), so this is believed to be correct.
|
||||
return (*[maxAllocSize]byte)(unsafeAdd(base, offset))[i:j:j]
|
||||
}
|
||||
|
||||
// unsafeSlice modifies the data, len, and cap of a slice variable pointed to by
|
||||
// the slice parameter. This helper should be used over other direct
|
||||
// manipulation of reflect.SliceHeader to prevent misuse, namely, converting
|
||||
// from reflect.SliceHeader to a Go slice type.
|
||||
func unsafeSlice(slice, data unsafe.Pointer, len int) {
|
||||
s := (*reflect.SliceHeader)(slice)
|
||||
s.Data = uintptr(data)
|
||||
s.Cap = len
|
||||
s.Len = len
|
||||
}
|
||||
|
4
vendor/modules.txt
vendored
4
vendor/modules.txt
vendored
@ -1096,8 +1096,8 @@ github.com/vishvananda/netns
|
||||
# github.com/yusufpapurcu/wmi v1.2.4
|
||||
## explicit; go 1.16
|
||||
github.com/yusufpapurcu/wmi
|
||||
# go.etcd.io/bbolt v1.3.9
|
||||
## explicit; go 1.17
|
||||
# go.etcd.io/bbolt v1.3.10
|
||||
## explicit; go 1.21
|
||||
go.etcd.io/bbolt
|
||||
# go.mongodb.org/mongo-driver v1.14.0
|
||||
## explicit; go 1.18
|
||||
|
Reference in New Issue
Block a user