Skip to content

Commit

Permalink
Remove redis specific workout from cache code
Browse files Browse the repository at this point in the history
This bumps the go-micro/v4/store/redis to latest commit from the main
branch to include these fixes:
micro/plugins#109
micro/plugins#110

It also removes the workaround of stripping the table prefixes in our
code.
  • Loading branch information
rhafer committed May 12, 2023
1 parent 562ede3 commit da69ac8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-remove-redis-workaround.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Remove go-micro/store/redis specific workaround

We submitted an upstream fix for an issue in the go-micro/store redis plugin.
Which allowed us to remove a redis specific workaround from the reva storage
cache implementation.

https://github.com/cs3org/reva/pull/3876
7 changes: 2 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ require (
github.com/go-micro/plugins/v4/events/natsjs v1.1.0
github.com/go-micro/plugins/v4/server/http v1.1.1
github.com/go-micro/plugins/v4/store/nats-js v1.1.0
github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230405210006-efd9191305c5
github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d
github.com/go-redis/redis/v8 v8.11.5
github.com/go-sql-driver/mysql v1.6.0
github.com/gofrs/flock v0.8.1
Expand Down Expand Up @@ -213,7 +213,4 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace (
github.com/cs3org/go-cs3apis => github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35
github.com/go-micro/plugins/v4/store/redis => github.com/dragonchaser/go-micro-plugins/v4/store/redis v0.0.0-20230508144354-06738dcca00f
)
replace github.com/cs3org/go-cs3apis => github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dragonchaser/go-micro-plugins/v4/store/redis v0.0.0-20230508144354-06738dcca00f h1:5siFx2qvzmMSIWJvN2JhdJmU0tlqIFzgcfOnJm8sGTg=
github.com/dragonchaser/go-micro-plugins/v4/store/redis v0.0.0-20230508144354-06738dcca00f/go.mod h1:MbCG0YiyPqETTtm7uHFmxQNCaW1o9hBoYtFwhbVjLUg=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
Expand Down Expand Up @@ -353,6 +351,8 @@ github.com/go-micro/plugins/v4/server/http v1.1.1 h1:n45l9rrJUWXT25W3DmTBl9DJoc3
github.com/go-micro/plugins/v4/server/http v1.1.1/go.mod h1:ZjVZi1l16RjzyT3IISirh9BEZdqzaLLwiE/1fvdSbnI=
github.com/go-micro/plugins/v4/store/nats-js v1.1.0 h1:6Fe1/eLtg8kRyaGvMILp4olYtTDGwYNBXyb1sYfAWGk=
github.com/go-micro/plugins/v4/store/nats-js v1.1.0/go.mod h1:jJf7Gm39OafZlT3s3UE2/9NIYj6OlI2fmZ4czSA3gvo=
github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d h1:HQoDDVyMfdkrgXNo03ZY4vzhoOXMDZVZ4SnpBDVID6E=
github.com/go-micro/plugins/v4/store/redis v1.2.1-0.20230510195111-07cd57e1bc9d/go.mod h1:MbCG0YiyPqETTtm7uHFmxQNCaW1o9hBoYtFwhbVjLUg=
github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY=
github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M=
Expand Down
3 changes: 0 additions & 3 deletions pkg/storage/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ func (cache cacheStore) List(opts ...microstore.ListOption) ([]string, error) {
if err != nil {
return nil, err
}
for i, key := range keys {
keys[i] = strings.TrimPrefix(key, cache.table)
}
return keys, nil
}

Expand Down

0 comments on commit da69ac8

Please sign in to comment.