• Sean McGivern's avatar
    Don't raise CrossSlotError when no keys given · 3a8a4ced
    Sean McGivern authored
    When no keys are passed to a Redis command that accepts multiple keys,
    that's an error. But it's not a cross-slot violation, as there are no
    slots. By raising this error we were masking the true
    Redis::CommandError underneath, which is bad for two reasons:
    1. It's confusing to developers.
    2. It leads to a different failure in production to development and
    To elaborate a bit more on the second point: the purpose of the
    CrossSlotError is to only be an _additional_ error in development and
    test, but it shouldn't _replace_ underlying errors as that can cause
    issues like this one.
redis_cluster_validator.rb 3.61 KB