fix critical typo in Redis connection creation, and reset connection when an exception is thrown
…on in Redis protocol
…f an exception arose, no need for the final 1
…l() elements I can't reproduce this now but at an outage at work I started getting "Odd number of elements in hash assignment at [...]/lib/ShardedKV/Storage/Redis/Hash.pm line 20". This likely had something to do with a stale persistent connection to Redis instance from a long-living uWSGI, because it only happened on a subset of the machines talking to Redis, and went away when uWSGI restarted. In any case made this code a bit more defensive so if it happens again then we'll have better error reporting, likely this was just returning (undef) or something like that. This happned against Redis.pm version 1.967, the latest current CPAN release.
A lot of this code would call methods and whatnot before accessing $@, which is a logic error, it also conflated returning false from a method with dying.
this is to prevent errors like this: Can't locate object method "throw" via package "ShardedKV::Error::ReadFail" (perhaps you forgot to load "ShardedKV::Error::ReadFail"?) at [snip]/ShardedKV/Storage/MySQL.pm line 344.
- Auto-reconnect options for Redis storage backend.
- Correctly capture exception messages so they proprogated - Add a new exception type DeleteFail (this was uncovered before)
…son for the exception occuring. Also add a new exception type for coverage when deletes happen.
- Implement reset_connection($key) at the top level - Add tests for reset_connection() functionality - Fix some POD retardedness - Fix a bug in MySQL storage reset_connection
- API CHANGE FOR THE SHIPPED STORAGE BACKENDS - Add error classes and throw exceptions when needed - Add some additional documentation - Remove all references to "master" connections (we'll add that feature at a later date if needed
…ll add that later when we need it
…terface role for storage backends)
…a timeout is breached by the consumer of this module