feat: RedisOptions.familyFallback#46
Conversation
Signed-off-by: David Bauch <jamesbauch@gmail.com>
mcollina
left a comment
There was a problem hiding this comment.
Can you please document this new option?
Good work!
|
Of course! Wanted to get your feedback first. I was thinking about the limitations of the alternating functionality. This could lead to excessive error logs. I've re-worked it quite a bit to be more configurable. I'm going to push the changes soon. |
- Add familyFallback option to handle connection failures by trying alternate IP versions - Support two fallback modes: - `alternate: false` (default): Try alternate family once, then stick to original - `alternate: true`: Continuously alternate between IP versions - Maintain backward compatibility with existing `family` option - Add comprehensive test coverage for all fallback scenarios - Track connection attempts with `_triedFamilyFour` and `_triedFamilySix` flags - Preserve original family in `_initialFamily` for reference This improves connection reliability by automatically handling IP version mismatches. Signed-off-by: David Bauch <jamesbauch@gmail.com>
bauchdj
left a comment
There was a problem hiding this comment.
feat: implement family fallback for Redis connections
- Add familyFallback option to handle connection failures by trying alternate IP versions
- Support two fallback modes:
alternate: false(default): Try alternate family once, then stick to originalalternate: true: Continuously alternate between IP versions
- Maintain backward compatibility with existing
familyoption - Add comprehensive test coverage for all fallback scenarios
- Track connection attempts with
_triedFamilyFourand_triedFamilySixflags - Preserve original family in
_initialFamilyfor reference - added JS Docs and updated docs
This improves connection reliability by automatically handling IP version mismatches.
Signed-off-by: David Bauch <jamesbauch@gmail.com>
|
@mcollina I fixed the test based on the output from the GitHub actions. Please run them again. |
|
@mcollina any chance you could re-run the checks? Much appreciated! |
|
@bauchdj code looks good. Can you explain why there are many changes to doc? |
|
@mcollina When you asked me to update the documentation, I assumed you wanted me to add JS Docs and rerun the docs generation. How would you like me to update the documentation? |
Signed-off-by: David Bauch <jamesbauch@gmail.com>
|
@mcollina I reverted the changes to |
|
@mcollina any update? |
Issue: #38
Added simple fallback option. On reconnect it will alternate between family 4 and 6.
The unit tests include: