You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sn...@apache.org on 2017/03/28 07:48:15 UTC

[9/9] cassandra git commit: Merge branch 'cassandra-3.11' into trunk

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/a0477617
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/a0477617
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/a0477617

Branch: refs/heads/trunk
Commit: a04776173a70dac66de939a26ea50544d5a45986
Parents: 35042ee 52fc62f
Author: Robert Stupp <sn...@snazy.de>
Authored: Tue Mar 28 09:46:07 2017 +0200
Committer: Robert Stupp <sn...@snazy.de>
Committed: Tue Mar 28 09:47:27 2017 +0200

----------------------------------------------------------------------
 CHANGES.txt                                             | 1 +
 NEWS.txt                                                | 2 ++
 src/java/org/apache/cassandra/net/MessagingService.java | 9 +++++++--
 3 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0477617/NEWS.txt
----------------------------------------------------------------------
diff --cc NEWS.txt
index cfb48e2,4c2e217..9048121
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -13,39 -13,6 +13,41 @@@ restore snapshots created with the prev
  'sstableloader' tool. You can upgrade the file format of your snapshots
  using the provided 'sstableupgrade' tool.
  
 +4.0
 +===
 +
 +New features
 +------------
 +   - The currentTimestamp, currentDate, currentTime and currentTimeUUID functions have been added.
 +     See CASSANDRA-13132
 +   - Support for arithmetic operations between `timestamp`/`date` and `duration` has been added.
 +     See CASSANDRA-11936
 +   - Support for arithmetic operations on number has been added. See CASSANDRA-11935
 +
 +Upgrading
 +---------
 +    - Cassandra 4.0 removed support for the deprecated Thrift interface. Amongst
 +      Tother things, this imply the removal of all yaml option related to thrift
 +      ('start_rpc', rpc_port, ...).
 +    - Cassandra 4.0 removed support for any pre-3.0 format. This means you
 +      cannot upgrade from a 2.x version to 4.0 directly, you have to upgrade to
 +      a 3.0.x/3.x version first (and run upgradesstable). In particular, this
 +      mean Cassandra 4.0 cannot load or read pre-3.0 sstables in any way: you
 +      will need to upgrade those sstable in 3.0.x/3.x first.
++    - Upgrades from 3.0.x or 3.x are supported since 3.0.13 or 3.11.0, previous
++      versions will causes issues during rolling upgrades (CASSANDRA-13274).
 +    - Cassandra will no longer allow invalid keyspace replication options, such
 +      as invalid datacenter names for NetworkTopologyStrategy. Operators MUST
 +      add new nodes to a datacenter before they can set set ALTER or CREATE
 +      keyspace replication policies using that datacenter. Existing keyspaces
 +      will continue to operate, but CREATE and ALTER will validate that all
 +      datacenters specified exist in the cluster.
 +    - Cassandra 4.0 fixes a problem with incremental repair which caused repaired
 +      data to be inconsistent between nodes. The fix changes the behavior of both
 +      full and incremental repairs. For full repairs, data is no longer marked
 +      repaired. For incremental repairs, anticompaction is run at the beginning
 +      of the repair, instead of at the end.
 +    - Config option index_interval has been removed (it was deprecated since 2.0)
  
  3.11.0
  ======

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a0477617/src/java/org/apache/cassandra/net/MessagingService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/net/MessagingService.java
index b7d4329,0e81c06..b3e7b61
--- a/src/java/org/apache/cassandra/net/MessagingService.java
+++ b/src/java/org/apache/cassandra/net/MessagingService.java
@@@ -1122,20 -1071,55 +1122,22 @@@ public final class MessagingService imp
       */
      public int setVersion(InetAddress endpoint, int version)
      {
-         // We can't talk to someone from the future
-         version = Math.min(version, current_version);
          logger.trace("Setting version {} for {}", version, endpoint);
  
 -        if (version < VERSION_22)
 -            allNodesAtLeast22 = false;
 -        if (version < VERSION_30)
 -            allNodesAtLeast30 = false;
 -
          Integer v = versions.put(endpoint, version);
 -
 -        // if the version was increased to 2.2 or later see if the min version across the cluster has changed
 -        if (v != null && (v < VERSION_30 && version >= VERSION_22))
 -            refreshAllNodeMinVersions();
 -
          return v == null ? version : v;
      }
  
      public void resetVersion(InetAddress endpoint)
      {
          logger.trace("Resetting version for {}", endpoint);
 -        Integer removed = versions.remove(endpoint);
 -        if (removed != null && Math.min(removed, current_version) <= VERSION_30)
 -            refreshAllNodeMinVersions();
 -    }
 -
 -    private void refreshAllNodeMinVersions()
 -    {
 -        boolean anyNodeLowerThan30 = false;
 -        for (Integer version : versions.values())
 -        {
 -            if (version < MessagingService.VERSION_30)
 -            {
 -                anyNodeLowerThan30 = true;
 -                allNodesAtLeast30 = false;
 -            }
 -
 -            if (version < MessagingService.VERSION_22)
 -            {
 -                allNodesAtLeast22 = false;
 -                return;
 -            }
 -        }
 -        allNodesAtLeast22 = true;
 -        allNodesAtLeast30 = !anyNodeLowerThan30;
 +        versions.remove(endpoint);
      }
  
+     /**
+      * Returns the messaging-version as announced by the given node but capped
+      * to the min of the version as announced by the node and {@link #current_version}.
+      */
      public int getVersion(InetAddress endpoint)
      {
          Integer v = versions.get(endpoint);