Merge branch 'cassandra-3.11' into trunk

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

Branch: refs/heads/trunk
Commit: ed4a7c5ebfc5f5f3e32e73267c0449702175b1f3
Parents: 6758295 1876588
Author: Ariel Weisberg <aweisb...@apple.com>
Authored: Wed May 3 16:35:25 2017 -0400
Committer: Ariel Weisberg <aweisb...@apple.com>
Committed: Wed May 3 16:38:27 2017 -0400

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 conf/cassandra.yaml                             |   9 +
 .../org/apache/cassandra/config/Config.java     |   6 +
 .../cassandra/config/DatabaseDescriptor.java    |  10 ++
 .../cassandra/net/OutboundTcpConnection.java    | 112 +++++++++---
 .../apache/cassandra/service/StorageProxy.java  |   8 +
 .../cassandra/service/StorageProxyMBean.java    |   3 +
 .../net/OutboundTcpConnectionTest.java          | 175 +++++++++++++++++++
 8 files changed, 299 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/conf/cassandra.yaml
----------------------------------------------------------------------
diff --cc conf/cassandra.yaml
index 1c54830,4bb5840..e968b0c
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@@ -1121,7 -1222,11 +1121,16 @@@ back_pressure_strategy
  # Do not try to coalesce messages if we already got that many messages. This 
should be more than 2 and less than 128.
  # otc_coalescing_enough_coalesced_messages: 8
  
+ # How many milliseconds to wait between two expiration runs on the backlog 
(queue) of the OutboundTcpConnection.
+ # Expiration is done if messages are piling up in the backlog. Droppable 
messages are expired to free the memory
+ # taken by expired messages. The interval should be between 0 and 1000, and 
in most installations the default value
+ # will be appropriate. A smaller value could potentially expire messages 
slightly sooner at the expense of more CPU
+ # time and queue contention while iterating the backlog of messages.
+ # An interval of 0 disables any wait time, which is the behavior of former 
Cassandra versions.
+ #
+ # otc_backlog_expiration_interval_ms: 200
++
 +# Track a metric per keyspace indicating whether replication achieved the 
ideal consistency
 +# level for writes without timing out. This is different from the consistency 
level requested by
 +# each write which may be lower in order to facilitate availability.
 +# ideal_consistency_level: EACH_QUORUM

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/net/OutboundTcpConnection.java
index 9b19eab,6cd1064..0677958
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
@@@ -354,11 -370,14 +380,11 @@@ public class OutboundTcpConnection exte
          }
      }
  
-     private void writeInternal(MessageOut message, int id, long timestamp) 
throws IOException
+     private void writeInternal(MessageOut<?> message, int id, long timestamp) 
throws IOException
      {
 +        //If you add/remove fields before the message don't forget to update 
PROTOCOL_MAGIC_ID_TIMESTAMP_SIZE
          out.writeInt(MessagingService.PROTOCOL_MAGIC);
 -
 -        if (targetVersion < MessagingService.VERSION_20)
 -            out.writeUTF(String.valueOf(id));
 -        else
 -            out.writeInt(id);
 +        out.writeInt(id);
  
          // int cast cuts off the high-order half of the timestamp, which we 
can assume remains
          // the same between now and when the recipient reconstructs it.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageProxy.java
index 6be5286,0da25a9..65aed6f
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@@ -2784,16 -2816,11 +2784,24 @@@ public class StorageProxy implements St
          return Schema.instance.getNumberOfTables();
      }
  
 +    public String getIdealConsistencyLevel()
 +    {
 +        return DatabaseDescriptor.getIdealConsistencyLevel().toString();
 +    }
 +
 +    public String setIdealConsistencyLevel(String cl)
 +    {
 +        ConsistencyLevel original = 
DatabaseDescriptor.getIdealConsistencyLevel();
 +        ConsistencyLevel newCL = 
ConsistencyLevel.valueOf(cl.trim().toUpperCase());
 +        DatabaseDescriptor.setIdealConsistencyLevel(newCL);
 +        return String.format("Updating ideal consistency level new value: %s 
old value %s", newCL, original.toString());
 +    }
++
+     public int getOtcBacklogExpirationInterval() {
+         return DatabaseDescriptor.getOtcBacklogExpirationInterval();
+     }
+ 
+     public void setOtcBacklogExpirationInterval(int intervalInMillis) {
+         DatabaseDescriptor.setOtcBacklogExpirationInterval(intervalInMillis);
+     }
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ed4a7c5e/src/java/org/apache/cassandra/service/StorageProxyMBean.java
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to