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
Migrage the console server's specifying logic into transport-common #926
Conversation
2fdf34f
to
eb9b861
Compare
Codecov Report
@@ Coverage Diff @@
## master #926 +/- ##
============================================
- Coverage 43.03% 42.58% -0.46%
+ Complexity 1568 1444 -124
============================================
Files 337 310 -27
Lines 9877 8993 -884
Branches 1332 1222 -110
============================================
- Hits 4251 3830 -421
+ Misses 5097 4696 -401
+ Partials 529 467 -62
Continue to review full report at Codecov.
|
try { | ||
port = Integer.parseInt(ipPortStr.substring(index + 1)); | ||
if (port <= 1 || port >= 65535) { | ||
throw new RuntimeException("Port number [" + port + "] over range"); |
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.
Maybe here we could just ignore the invalid item, rather than fail directly. What do you think of it?
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.
The dealing in old logics,
it will be just ignored in simple-http
while in netty-http
an exception is generated (in InetSocketAddress.checkPort()
) but also caught immediately in place, log a warning in record.log, print a stack trace to standard output.
Because the logging of sentinel can not be merged into the biz project's logging so the warning may be ignored. So the malformed :port
is more like to be eaten and initializing flow will go on without the correct dashboard target.
That's why some guys suffer from no heartbeat / no application registered.
I like the idea of stopping to fix rather than ignore but logging.
But I will also feel ok on keeping the logic the same as how it acted in netty-http
.
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.
It's okay for me. I'll review the PR these days.
Could you please resolve the conflicts? |
eb9b861
to
9bb794e
Compare
They have been resolved. |
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.
LGTM
Thanks! |
…-transport-common (alibaba#926)
…-transport-common (alibaba#926)
Describe what this PR does / why we need it
Because there are similar implementation in both
simple-http
andnetty-http
submodules on processing console server's address so migrate it into transport-common.Does this pull request fix one issue?
NO
Special notes for reviews
Should actually run for verifying.