lorawan-stack icon indicating copy to clipboard operation
lorawan-stack copied to clipboard

Support Redis 7

Open adriansmares opened this issue 3 years ago • 1 comments

Summary

Closes https://github.com/TheThingsNetwork/lorawan-stack/issues/5416 References https://github.com/go-redis/redis/pull/2110

Changes

  • Upgrade to go-redis 9.0.0-beta.2
    • The error in the linked issue is caused by our use of XAutoClaim. As part of Redis 7.0, a new return parameter was added to XAutoClaim - the entries that were part of the PEL but were deleted in the meantime. This mismatch (2 vs 3 return values) was reported in the linked issue. We do not seem to have a semantic mismatch.
    • The upgrade itself is done in two steps - change every /v8 to /v9 + upgrade go.mod, then fix the API changes.
    • Most of the API changes were minor - the removal of Close() from pipeliners and the fact that XAdd parameters now require an explicit approximation parameter.

Testing

CI.

Regressions

Fundamentally nothing changes - this is only a database library change, so the only regressions that we would feel would be regressions that are in the library itself.

Checklist

  • [x] Scope: The referenced issue is addressed, there are no unrelated changes.
  • [x] Compatibility: The changes are backwards compatible with existing API, storage, configuration and CLI, according to the compatibility commitments in README.md for the chosen target branch.
  • [ ] Documentation: Relevant documentation is added or updated.
  • [ ] Changelog: Significant features, behavior changes, deprecations and fixes are added to CHANGELOG.md.
  • [x] Commits: Commit messages follow guidelines in CONTRIBUTING.md, there are no fixup commits left.

adriansmares avatar Jun 30 '22 12:06 adriansmares

No new tag since v9.0.0-beta.1. Still waiting on a stable release.


16 Oct 2022 update: Updated to v9.0.0-rc.1. Also contains a semantics update for XRead/XReadGroup, since now Redis operations cannot be asynchronously cancelled anymore.


5 Dec 2022 update: Updated to v9.0.0-rc.2. No semantical changes.

adriansmares avatar Jul 15 '22 10:07 adriansmares

Is this ready for review and good to go?

johanstokking avatar Jan 18 '23 09:01 johanstokking

Is this ready for review and good to go?

The PR is ready for review, but we haven't had an official release of go-redis v9 - the latest release is rc2 from November last year.

adriansmares avatar Jan 18 '23 10:01 adriansmares

Please re-request review when there are non-dependency code changes.

johanstokking avatar Jan 18 '23 10:01 johanstokking