Browse Source

upgrade to github.com/redis/go-redis/v9

fix https://github.com/seaweedfs/seaweedfs/issues/4532
pull/5768/head
chrislu 6 months ago
parent
commit
c59517e284
  1. 3
      go.mod
  2. 4
      go.sum
  3. 2
      weed/filer/redis/redis_cluster_store.go
  4. 2
      weed/filer/redis/redis_store.go
  5. 2
      weed/filer/redis/universal_redis_store.go
  6. 2
      weed/filer/redis/universal_redis_store_kv.go
  7. 2
      weed/filer/redis2/redis_cluster_store.go
  8. 2
      weed/filer/redis2/redis_sentinel_store.go
  9. 2
      weed/filer/redis2/redis_store.go
  10. 4
      weed/filer/redis2/universal_redis_store.go
  11. 2
      weed/filer/redis2/universal_redis_store_kv.go
  12. 6
      weed/filer/redis3/ItemList.go
  13. 2
      weed/filer/redis3/item_list_serde.go
  14. 2
      weed/filer/redis3/kv_directory_children.go
  15. 2
      weed/filer/redis3/kv_directory_children_test.go
  16. 4
      weed/filer/redis3/redis_cluster_store.go
  17. 4
      weed/filer/redis3/redis_sentinel_store.go
  18. 4
      weed/filer/redis3/redis_store.go
  19. 2
      weed/filer/redis3/skiplist_element_store.go
  20. 2
      weed/filer/redis3/universal_redis_store.go
  21. 2
      weed/filer/redis3/universal_redis_store_kv.go
  22. 2
      weed/filer/redis_lua/redis_cluster_store.go
  23. 2
      weed/filer/redis_lua/redis_sentinel_store.go
  24. 2
      weed/filer/redis_lua/redis_store.go
  25. 2
      weed/filer/redis_lua/stored_procedure/init.go
  26. 2
      weed/filer/redis_lua/universal_redis_store.go
  27. 2
      weed/filer/redis_lua/universal_redis_store_kv.go

3
go.mod

@ -29,7 +29,7 @@ require (
github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 // indirect
github.com/fclairamb/ftpserverlib v0.24.1
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-redis/redis/v8 v8.11.5
github.com/go-redis/redis/v8 v8.11.5 // indirect
github.com/go-redsync/redsync/v4 v4.13.0
github.com/go-sql-driver/mysql v1.8.1
github.com/go-zookeeper/zk v1.0.3 // indirect
@ -147,6 +147,7 @@ require (
github.com/rabbitmq/amqp091-go v1.10.0
github.com/rclone/rclone v1.66.0
github.com/rdleal/intervalst v1.4.0
github.com/redis/go-redis/v9 v9.5.1
github.com/schollz/progressbar/v3 v3.14.4
github.com/shirou/gopsutil/v3 v3.24.5
github.com/tikv/client-go/v2 v2.0.7

4
go.sum

@ -686,6 +686,10 @@ github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl
github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8=
github.com/bradenaw/juniper v0.15.2 h1:0JdjBGEF2jP1pOxmlNIrPhAoQN7Ng5IMAY5D0PHMW4U=
github.com/bradenaw/juniper v0.15.2/go.mod h1:UX4FX57kVSaDp4TPqvSjkAAewmRFAfXf27BOs5z9dq8=
github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/buengese/sgzip v0.1.1 h1:ry+T8l1mlmiWEsDrH/YHZnCVWD2S3im1KLsyO+8ZmTU=
github.com/buengese/sgzip v0.1.1/go.mod h1:i5ZiXGF3fhV7gL1xaRRL1nDnmpNj0X061FQzOS8VMas=
github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0=

2
weed/filer/redis/redis_cluster_store.go

@ -1,7 +1,7 @@
package redis
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

2
weed/filer/redis/redis_store.go

@ -1,7 +1,7 @@
package redis
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

2
weed/filer/redis/universal_redis_store.go

@ -7,7 +7,7 @@ import (
"strings"
"time"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/glog"

2
weed/filer/redis/universal_redis_store_kv.go

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

2
weed/filer/redis2/redis_cluster_store.go

@ -1,7 +1,7 @@
package redis2
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

2
weed/filer/redis2/redis_sentinel_store.go

@ -1,7 +1,7 @@
package redis2
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
"time"

2
weed/filer/redis2/redis_store.go

@ -1,7 +1,7 @@
package redis2
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

4
weed/filer/redis2/universal_redis_store.go

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/glog"
@ -57,7 +57,7 @@ func (store *UniversalRedis2Store) InsertEntry(ctx context.Context, entry *filer
}
if name != "" {
if err = store.Client.ZAddNX(ctx, genDirectoryListKey(dir), &redis.Z{Score: 0, Member: name}).Err(); err != nil {
if err = store.Client.ZAddNX(ctx, genDirectoryListKey(dir), redis.Z{Score: 0, Member: name}).Err(); err != nil {
return fmt.Errorf("persisting %s in parent dir: %v", entry.FullPath, err)
}
}

2
weed/filer/redis2/universal_redis_store_kv.go

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

6
weed/filer/redis3/ItemList.go

@ -4,7 +4,7 @@ import (
"bytes"
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/util/skiplist"
)
@ -399,9 +399,9 @@ func (nl *ItemList) NodeSize(node *skiplist.SkipListElementReference) int {
func (nl *ItemList) NodeAddMember(node *skiplist.SkipListElementReference, names ...string) error {
key := fmt.Sprintf("%s%dm", nl.prefix, node.ElementPointer)
var members []*redis.Z
var members []redis.Z
for _, name := range names {
members = append(members, &redis.Z{
members = append(members, redis.Z{
Score: 0,
Member: name,
})

2
weed/filer/redis3/item_list_serde.go

@ -1,7 +1,7 @@
package redis3
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/util/skiplist"
"google.golang.org/protobuf/proto"

2
weed/filer/redis3/kv_directory_children.go

@ -3,7 +3,7 @@ package redis3
import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/glog"
)

2
weed/filer/redis3/kv_directory_children_test.go

@ -3,7 +3,7 @@ package redis3
import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/stvp/tempredis"
"strconv"
"testing"

4
weed/filer/redis3/redis_cluster_store.go

@ -1,9 +1,9 @@
package redis3
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis/v8"
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

4
weed/filer/redis3/redis_sentinel_store.go

@ -3,9 +3,9 @@ package redis3
import (
"time"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis/v8"
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

4
weed/filer/redis3/redis_store.go

@ -1,9 +1,9 @@
package redis3
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis/v8"
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

2
weed/filer/redis3/skiplist_element_store.go

@ -3,7 +3,7 @@ package redis3
import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/util/skiplist"
"google.golang.org/protobuf/proto"

2
weed/filer/redis3/universal_redis_store.go

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
redsync "github.com/go-redsync/redsync/v4"
"github.com/seaweedfs/seaweedfs/weed/filer"

2
weed/filer/redis3/universal_redis_store_kv.go

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

2
weed/filer/redis_lua/redis_cluster_store.go

@ -1,7 +1,7 @@
package redis_lua
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

2
weed/filer/redis_lua/redis_sentinel_store.go

@ -1,7 +1,7 @@
package redis_lua
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
"time"

2
weed/filer/redis_lua/redis_store.go

@ -1,7 +1,7 @@
package redis_lua
import (
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

2
weed/filer/redis_lua/stored_procedure/init.go

@ -2,7 +2,7 @@ package stored_procedure
import (
_ "embed"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
)
func init() {

2
weed/filer/redis_lua/universal_redis_store.go

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/filer/redis_lua/stored_procedure"

2
weed/filer/redis_lua/universal_redis_store_kv.go

@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/redis/go-redis/v9"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

|||||||
100:0
Loading…
Cancel
Save