Browse Source

Revert "Initial patch for redis version 7 support (#4572)"

This reverts commit a25bca0692.
pull/4576/head
chrislu 2 years ago
parent
commit
3fbf4f6189
  1. 2
      weed/filer/redis/redis_cluster_store.go
  2. 2
      weed/filer/redis/redis_store.go
  3. 5
      weed/filer/redis/universal_redis_store.go
  4. 2
      weed/filer/redis/universal_redis_store_kv.go
  5. 2
      weed/filer/redis2/redis_cluster_store.go
  6. 5
      weed/filer/redis2/redis_sentinel_store.go
  7. 2
      weed/filer/redis2/redis_store.go
  8. 4
      weed/filer/redis2/universal_redis_store.go
  9. 2
      weed/filer/redis2/universal_redis_store_kv.go
  10. 7
      weed/filer/redis3/ItemList.go
  11. 2
      weed/filer/redis3/item_list_serde.go
  12. 3
      weed/filer/redis3/kv_directory_children.go
  13. 5
      weed/filer/redis3/kv_directory_children_test.go
  14. 4
      weed/filer/redis3/redis_cluster_store.go
  15. 4
      weed/filer/redis3/redis_sentinel_store.go
  16. 4
      weed/filer/redis3/redis_store.go
  17. 3
      weed/filer/redis3/skiplist_element_store.go
  18. 2
      weed/filer/redis3/universal_redis_store.go
  19. 2
      weed/filer/redis3/universal_redis_store_kv.go
  20. 2
      weed/filer/redis_lua/redis_cluster_store.go
  21. 5
      weed/filer/redis_lua/redis_sentinel_store.go
  22. 2
      weed/filer/redis_lua/redis_store.go
  23. 3
      weed/filer/redis_lua/stored_procedure/init.go
  24. 2
      weed/filer/redis_lua/universal_redis_store.go
  25. 2
      weed/filer/redis_lua/universal_redis_store_kv.go

2
weed/filer/redis/redis_cluster_store.go

@ -1,7 +1,7 @@
package redis
import (
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

5
weed/filer/redis/universal_redis_store.go

@ -3,12 +3,11 @@ package redis
import (
"context"
"fmt"
"golang.org/x/exp/slices"
"strings"
"time"
"golang.org/x/exp/slices"
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

2
weed/filer/redis2/redis_cluster_store.go

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

5
weed/filer/redis2/redis_sentinel_store.go

@ -1,11 +1,10 @@
package redis2
import (
"time"
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
"time"
)
func init() {

2
weed/filer/redis2/redis_store.go

@ -1,7 +1,7 @@
package redis2
import (
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

7
weed/filer/redis3/ItemList.go

@ -4,8 +4,7 @@ import (
"bytes"
"context"
"fmt"
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/util/skiplist"
)
@ -400,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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/util/skiplist"
"google.golang.org/protobuf/proto"

3
weed/filer/redis3/kv_directory_children.go

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

5
weed/filer/redis3/kv_directory_children_test.go

@ -3,12 +3,11 @@ package redis3
import (
"context"
"fmt"
"github.com/go-redis/redis/v8"
"github.com/stvp/tempredis"
"strconv"
"testing"
"time"
"github.com/redis/go-redis/v9"
"github.com/stvp/tempredis"
)
var names = []string{

4
weed/filer/redis3/redis_cluster_store.go

@ -1,9 +1,9 @@
package redis3
import (
"github.com/go-redis/redis/v8"
"github.com/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
"github.com/redis/go-redis/v9"
"github.com/go-redsync/redsync/v4/redis/goredis/v8"
"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/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
"github.com/redis/go-redis/v9"
"github.com/go-redsync/redsync/v4/redis/goredis/v8"
"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/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis/v9"
"github.com/redis/go-redis/v9"
"github.com/go-redsync/redsync/v4/redis/goredis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

3
weed/filer/redis3/skiplist_element_store.go

@ -3,8 +3,7 @@ package redis3
import (
"context"
"fmt"
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
)

5
weed/filer/redis_lua/redis_sentinel_store.go

@ -1,11 +1,10 @@
package redis_lua
import (
"time"
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/util"
"time"
)
func init() {

2
weed/filer/redis_lua/redis_store.go

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

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

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

2
weed/filer/redis_lua/universal_redis_store.go

@ -5,7 +5,7 @@ import (
"fmt"
"time"
"github.com/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"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/redis/go-redis/v9"
"github.com/go-redis/redis/v8"
"github.com/seaweedfs/seaweedfs/weed/filer"
)

Loading…
Cancel
Save