-
Notifications
You must be signed in to change notification settings - Fork 0
Increment server failure on hostname lookup failures #8
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a test case to verify that server ejection is not currently working for DNS errors when connecting to memcached servers. The test demonstrates that servers experiencing hostname lookup failures should be ejected but currently are not being properly marked as dead.
- Adds a new test
test_dns_nxdomain_server
that exercises DNS error handling and server ejection - Removes Unix socket server from test configuration to simplify the test setup
- Comments out UDP and domain socket memcached server initialization in setup
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
test/unit/memcached_test.rb | Adds DNS error test case and updates server configuration to exclude Unix socket |
test/setup.rb | Comments out UDP and domain socket server initialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect it will be hard to roll this change gradually in prod so glad to see a thorough test here.
Can we try it in review lab first?
Bad idea alert... ship the dep bump in a pr to review lab that also adds a non existent host to the mc config? |
This change increments server failure counter when
MEMCACHED_HOST_LOOKUP_FAILURE
occursThis will allow the server to be ejected when persistent DNS issues occur to prevent constant retries
Sample test failure before change: