Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DataStore::RedisMulti #2443

Merged
merged 3 commits into from Mar 9, 2022
Merged

Commits on Mar 9, 2022

  1. Expand required methods in DataStore

    These are all implemented by `DataStore::Redis`, which is currently the
    only implementation of the `DataStore` role -- so as it turns out,
    attributes that have `does => 'MusicBrainz::DataStore'` already expect
    these to be implemented.
    mwiencek committed Mar 9, 2022
    Copy the full SHA
    c69d4a4 View commit details
    Browse the repository at this point in the history
  2. Don't call _prepare_key twice

    remove is an alias for delete, which already calls _prepare_key.
    mwiencek committed Mar 9, 2022
    Copy the full SHA
    d7ea789 View commit details
    Browse the repository at this point in the history
  3. Add DataStore::RedisMulti

    If the `DataStore::RedisMulti` module is active, then
    `DATASTORE_REDIS_ARGS` may return an array ref of connection details.
    (How do you know if it's active? grep for `DataStore::RedisMulti->new`.
    We may revert back to plain-old `DataStore::Redis` if multiple instances
    aren't needed.)
    
    This module is useful when Redis service needs to be migrated to a new
    server. We'll attempt to read from each connection in order (returning
    the first non-empty result), and also distribute writes to all
    connections. This allows time to copy any keys that don't exist on the
    new instance from the old instance.
    mwiencek committed Mar 9, 2022
    Copy the full SHA
    3f4d926 View commit details
    Browse the repository at this point in the history