cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sn...@apache.org
Subject [2/2] cassandra git commit: Merge branch 'cassandra-2.1' into cassandra-2.2
Date Mon, 19 Oct 2015 12:59:24 GMT
Merge branch 'cassandra-2.1' into cassandra-2.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0bfa26d6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0bfa26d6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0bfa26d6

Branch: refs/heads/cassandra-2.2
Commit: 0bfa26d6011b6e1c79c164a1acc29884d8157ade
Parents: 289b7b7 b84ed11
Author: Robert Stupp <snazy@snazy.de>
Authored: Mon Oct 19 14:56:41 2015 +0200
Committer: Robert Stupp <snazy@snazy.de>
Committed: Mon Oct 19 14:56:41 2015 +0200

----------------------------------------------------------------------
 .../apache/cassandra/net/MessagingService.java  | 24 +++++++++++++++-----
 1 file changed, 18 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0bfa26d6/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/net/MessagingService.java
index 2a63553,724518c..4aafdd1
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@@ -1024,14 -1028,10 +1032,10 @@@ public final class MessagingService imp
              }
              catch (IOException e)
              {
-                 // dirty hack for clean shutdown on OSX w/ Java >= 1.8.0_20
                  // see https://issues.apache.org/jira/browse/CASSANDRA-8220
-                 // see https://bugs.openjdk.java.net/browse/JDK-8050499
-                 if (!"Unknown error: 316".equals(e.getMessage()) || !"Mac OS X".equals(System.getProperty("os.name")))
-                     throw e;
+                 handleIOException(e);
              }
- 
 -            for (Closeable connection : connections) 
 +            for (Closeable connection : connections)
              {
                  connection.close();
              }
@@@ -1043,11 -1043,19 +1047,19 @@@
          }
      }
  
+     private static void handleIOException(IOException e) throws IOException
+     {
+         // dirty hack for clean shutdown on OSX w/ Java >= 1.8.0_20
+         // see https://bugs.openjdk.java.net/browse/JDK-8050499
+         if (!"Unknown error: 316".equals(e.getMessage()) || !"Mac OS X".equals(System.getProperty("os.name")))
+             throw e;
+     }
+ 
 -    public Map<String, Integer> getCommandPendingTasks()
 +    public Map<String, Integer> getLargeMessagePendingTasks()
      {
 -        Map<String, Integer> pendingTasks = new HashMap<String, Integer>();
 +        Map<String, Integer> pendingTasks = new HashMap<String, Integer>(connectionManagers.size());
          for (Map.Entry<InetAddress, OutboundTcpConnectionPool> entry : connectionManagers.entrySet())
 -            pendingTasks.put(entry.getKey().getHostAddress(), entry.getValue().cmdCon.getPendingMessages());
 +            pendingTasks.put(entry.getKey().getHostAddress(), entry.getValue().largeMessages.getPendingMessages());
          return pendingTasks;
      }
  


Mime
View raw message