-
Notifications
You must be signed in to change notification settings - Fork 803
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
[SCB-2351] Optimize the ping method #2626
Conversation
When there are multiple endpoints, ping only the first one may cause the available services to be defined as unavailable
miss logger
Codecov Report
@@ Coverage Diff @@
## master #2626 +/- ##
============================================
+ Coverage 77.72% 77.74% +0.01%
Complexity 1429 1429
============================================
Files 1598 1598
Lines 42652 42657 +5
Branches 3591 3592 +1
============================================
+ Hits 33151 33162 +11
+ Misses 8000 7996 -4
+ Partials 1501 1499 -2
Continue to review full report at Codecov.
|
|
||
/** | ||
* Simple implementation of .MicroserviceInstancePing using telnet | ||
*/ | ||
public class SimpleMicroserviceInstancePing implements MicroserviceInstancePing { | ||
private static final Logger LOGGER = LoggerFactory.getLogger(SimpleMicroserviceInstancePing.class); |
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.
- use etc/*.xml code formatter formate code
- create a JIRA issue and submit a PR with JIRA id, see other PRs
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.
done, but I'm not sure if I did it right
s.connect(new InetSocketAddress(ipPort.getHostOrIp(), ipPort.getPort()), 3000); | ||
return true; | ||
} catch (IOException e) { | ||
LOGGER.warn("IOException, probable ping instance failed endpoint is {}", endpoint); |
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.
"ping instance {} endpoint {} failed", instanceid, endpoint
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.
done
use intellij-java-google-style.xml format code and change log
add UT for ping method changed
When there are multiple endpoints, ping only the first one may cause the available services to be defined as unavailable
#2624