From 6db4b920eb9bc7a4743a989d1fa8efd4ac254e1e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 15 Apr 2024 07:42:22 +0000 Subject: [PATCH] fix(deps): update patch digest dependencies --- go.mod | 4 ++-- go.sum | 4 ++++ .../RoaringBitmap/roaring/bitmapcontainer.go | 24 +++++++++++++++++-- vendor/modules.txt | 4 ++-- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index c0ac51fb4..615950d94 100644 --- a/go.mod +++ b/go.mod @@ -3,11 +3,11 @@ module github.com/longhorn/longhorn-instance-manager go 1.21 require ( - github.com/RoaringBitmap/roaring v1.9.1 + github.com/RoaringBitmap/roaring v1.9.2 github.com/google/uuid v1.6.0 github.com/longhorn/backupstore v0.0.0-20240219094812-3a87ee02df77 github.com/longhorn/go-common-libs v0.0.0-20240411093823-b8862efb8e03 - github.com/longhorn/go-spdk-helper v0.0.0-20240328085119-7ab2393959d9 + github.com/longhorn/go-spdk-helper v0.0.0-20240415074119-eb1e91922189 github.com/longhorn/longhorn-engine v1.6.0-dev-20240105.0.20240126141003-067f67803ee8 github.com/longhorn/longhorn-spdk-engine v0.0.0-20240329092432-8326ea00b711 github.com/pkg/errors v0.9.1 diff --git a/go.sum b/go.sum index 8075329c7..34e6d43b2 100644 --- a/go.sum +++ b/go.sum @@ -9,6 +9,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0/go.mod h1:tPaiy8S5bQ github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/RoaringBitmap/roaring v1.9.1 h1:LXcSqGGGMKm+KAzUyWn7ZeREqoOkoMX+KwLOK1thc4I= github.com/RoaringBitmap/roaring v1.9.1/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= +github.com/RoaringBitmap/roaring v1.9.2 h1:TjoelXOmLrpjbDTzXwr6F17pusrgqUeBE2lp9N6YHRg= +github.com/RoaringBitmap/roaring v1.9.2/go.mod h1:6AXUsoIEzDTFFQCe1RbGA6uFONMhvejWj5rqITANK90= github.com/aws/aws-sdk-go v1.46.1 h1:U26quvBWFZMQuultLw5tloW4GnmWaChEwMZNq8uYatw= github.com/aws/aws-sdk-go v1.46.1/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -71,6 +73,8 @@ github.com/longhorn/go-common-libs v0.0.0-20240411093823-b8862efb8e03 h1:RN7mq4F github.com/longhorn/go-common-libs v0.0.0-20240411093823-b8862efb8e03/go.mod h1:7onp+E4hSg2DnB40dJU0Y7adrvykGg6jHxOb48imPGg= github.com/longhorn/go-spdk-helper v0.0.0-20240328085119-7ab2393959d9 h1:spgyLW1ND0GZJkzFyfJvbvcjVtAwBU2Msg+Jy2Yy02k= github.com/longhorn/go-spdk-helper v0.0.0-20240328085119-7ab2393959d9/go.mod h1:WGm84AyXymx7L0CqOw8KEr9okywD+Cj5xZi+eKeOoiU= +github.com/longhorn/go-spdk-helper v0.0.0-20240415074119-eb1e91922189 h1:g4CoDfmj1rrJPNUJWPAp4LKa+9IGr+nQbQLOfOnxg4s= +github.com/longhorn/go-spdk-helper v0.0.0-20240415074119-eb1e91922189/go.mod h1:99yD4ZjORUMmuxZRTDd9+AzTwc0mpKCWQJoTkKwEZJU= github.com/longhorn/longhorn-engine v1.6.0-dev-20240105.0.20240126141003-067f67803ee8 h1:Oj5bAlKBzS+qPxA8lfpUcbllrVjnHVCuhPcQv/V98xw= github.com/longhorn/longhorn-engine v1.6.0-dev-20240105.0.20240126141003-067f67803ee8/go.mod h1:Snkv3gy4AUOhZSYMI7g7lVX/OOB8DTo28eJwsEfbAwM= github.com/longhorn/longhorn-spdk-engine v0.0.0-20240329092432-8326ea00b711 h1:yVkjZgb3Kn16xZfZZQpi8noZwRaYln1X4bskcGVmXJk= diff --git a/vendor/github.com/RoaringBitmap/roaring/bitmapcontainer.go b/vendor/github.com/RoaringBitmap/roaring/bitmapcontainer.go index 35e684381..9f784aaa8 100644 --- a/vendor/github.com/RoaringBitmap/roaring/bitmapcontainer.go +++ b/vendor/github.com/RoaringBitmap/roaring/bitmapcontainer.go @@ -893,8 +893,28 @@ func (bc *bitmapContainer) iandNotArray(ac *arrayContainer) container { } func (bc *bitmapContainer) iandNotRun16(rc *runContainer16) container { - rcb := rc.toBitmapContainer() - return bc.iandNotBitmapSurely(rcb) + if rc.isEmpty() || bc.isEmpty() { + // Nothing to do. + return bc + } + + wordRangeStart := rc.iv[0].start / 64 + wordRangeEnd := (rc.iv[len(rc.iv)-1].last()) / 64 // inclusive + + cardinalityChange := popcntSlice(bc.bitmap[wordRangeStart : wordRangeEnd+1]) // before cardinality - after cardinality (for word range) + + for _, iv := range rc.iv { + resetBitmapRange(bc.bitmap, int(iv.start), int(iv.last())+1) + } + + cardinalityChange -= popcntSlice(bc.bitmap[wordRangeStart : wordRangeEnd+1]) + + bc.cardinality -= int(cardinalityChange) + + if bc.getCardinality() <= arrayDefaultMaxSize { + return bc.toArrayContainer() + } + return bc } func (bc *bitmapContainer) andNotArray(value2 *arrayContainer) container { diff --git a/vendor/modules.txt b/vendor/modules.txt index 5f5cd8b2a..3162dc83d 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -23,7 +23,7 @@ github.com/Azure/azure-sdk-for-go/sdk/internal/uuid ## explicit; go 1.16 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/internal -# github.com/RoaringBitmap/roaring v1.9.1 +# github.com/RoaringBitmap/roaring v1.9.2 ## explicit; go 1.14 github.com/RoaringBitmap/roaring github.com/RoaringBitmap/roaring/internal @@ -157,7 +157,7 @@ github.com/longhorn/go-common-libs/sync github.com/longhorn/go-common-libs/sys github.com/longhorn/go-common-libs/types github.com/longhorn/go-common-libs/utils -# github.com/longhorn/go-spdk-helper v0.0.0-20240328085119-7ab2393959d9 +# github.com/longhorn/go-spdk-helper v0.0.0-20240415074119-eb1e91922189 ## explicit; go 1.21 github.com/longhorn/go-spdk-helper/pkg/jsonrpc github.com/longhorn/go-spdk-helper/pkg/nvme