You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ya...@apache.org on 2017/11/17 19:01:39 UTC

mesos git commit: Downgraded the logging level of socket shutdown failures.

Repository: mesos
Updated Branches:
  refs/heads/master 2a253093e -> 08d22ffbb


Downgraded the logging level of socket shutdown failures.

It often merely shows that a connection is closed before libprocess
shuts it down so it should be logged at INFO level.

Review: https://reviews.apache.org/r/63900


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/08d22ffb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/08d22ffb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/08d22ffb

Branch: refs/heads/master
Commit: 08d22ffbb311bc4a7515d422367b3c58a17a540a
Parents: 2a25309
Author: Jiang Yan Xu <xu...@apple.com>
Authored: Thu Nov 16 22:04:09 2017 -0800
Committer: Jiang Yan Xu <xu...@apple.com>
Committed: Thu Nov 16 22:39:24 2017 -0800

----------------------------------------------------------------------
 3rdparty/libprocess/src/process.cpp | 27 +++++++++++++++++----------
 1 file changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/08d22ffb/3rdparty/libprocess/src/process.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/process.cpp b/3rdparty/libprocess/src/process.cpp
index 732aff8..3942a3a 100644
--- a/3rdparty/libprocess/src/process.cpp
+++ b/3rdparty/libprocess/src/process.cpp
@@ -2472,12 +2472,16 @@ Encoder* SocketManager::next(int_fd s)
           sockets.erase(iterator);
 
           Try<Nothing> shutdown = socket.shutdown();
+
+          // Failure here could be due to reasons including that the underlying
+          // socket is already closed so it by itself doesn't necessarily
+          // suggest anything wrong.
           if (shutdown.isError()) {
-            LOG(ERROR) << "Failed to shutdown socket with fd " << socket.get()
-                       << ", address " << (socket.address().isSome()
-                                             ? stringify(socket.address().get())
-                                             : "N/A")
-                       << ": " << shutdown.error();
+            LOG(INFO) << "Failed to shutdown socket with fd " << socket.get()
+                      << ", address " << (socket.address().isSome()
+                                            ? stringify(socket.address().get())
+                                            : "N/A")
+                      << ": " << shutdown.error();
           }
         }
       }
@@ -2556,13 +2560,16 @@ void SocketManager::close(int_fd s)
       Socket socket = iterator->second;
       sockets.erase(iterator);
 
+      // Failure here could be due to reasons including that the underlying
+      // socket is already closed so it by itself doesn't necessarily
+      // suggest anything wrong.
       Try<Nothing> shutdown = socket.shutdown();
       if (shutdown.isError()) {
-        LOG(ERROR) << "Failed to shutdown socket with fd " << socket.get()
-                   << ", address " << (socket.address().isSome()
-                                         ? stringify(socket.address().get())
-                                         : "N/A")
-                   << ": " << shutdown.error();
+        LOG(INFO) << "Failed to shutdown socket with fd " << socket.get()
+                  << ", address " << (socket.address().isSome()
+                                        ? stringify(socket.address().get())
+                                        : "N/A")
+                  << ": " << shutdown.error();
       }
     }
   }