Gargi-jais11 commented on code in PR #11798:
URL: https://github.com/apache/ozone/pull/11798#discussion_r4399325018
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/XceiverServerDomainSocket.java:
##########
@@ -230,6 +230,14 @@ public void run() {
// usually when the xceiver count limit is hit.
LOG.warn("Got an exception. Peer {}", peer, ie);
IOUtils.closeQuietly(peer);
+ if (peer == null) {
+ // accept() itself failed, for example with no file descriptor left,
and would fail again right away
+ try {
+ Thread.sleep(TimeUnit.SECONDS.toMillis(1L));
Review Comment:
@yandrey321 thes pause only happens when **accept()** itself throws, suppose
when the datanode is out of file descriptors. Normal accepts, idle timeouts,
and rejected connections are not delayed. In that state a retry fails again
almost at once: without the pause the test saw about 14,600 accept() calls in
500 ms. One second matches the fixed 30-second pause the same loop already uses
after an OutOfMemoryError, and **Hadoop's DataXceiverServe**r uses a similar
fixed backoff.
@ChenSammi, what do you prefer? I can keep the fixed 1 second, 2.) use a
shorter fixed value such as 100 ms, or add a datanode config key for it. A
config key seems like more than this case needs, but I'm happy to add one if
you think it's useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]