You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2015/06/03 13:17:15 UTC

[2/3] cassandra git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.2
Commit: a90c80dda60cbe7c4101b000739900442af4ee82
Parents: c0f96e1 b6a31fb
Author: Aleksey Yeschenko <al...@apache.org>
Authored: Wed Jun 3 14:01:30 2015 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Wed Jun 3 14:01:30 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt                                          | 1 +
 src/java/org/apache/cassandra/config/CFMetaData.java | 4 +++-
 src/java/org/apache/cassandra/db/SystemKeyspace.java | 6 ++++--
 3 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c80dd/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 4a7e174,c555a91..04650c1
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,37 -1,5 +1,38 @@@
 -2.0.16:
 +2.1.6
 + * Consistent error message when a table mixes counter and non-counter
 +   columns (CASSANDRA-9492)
 + * Avoid getting unreadable keys during anticompaction (CASSANDRA-9508)
 + * (cqlsh) Better float precision by default (CASSANDRA-9224)
 + * Improve estimated row count (CASSANDRA-9107)
 + * Optimize range tombstone memory footprint (CASSANDRA-8603)
 + * Use configured gcgs in anticompaction (CASSANDRA-9397)
 + * Warn on misuse of unlogged batches (CASSANDRA-9282)
 + * Failure detector detects and ignores local pauses (CASSANDRA-9183)
 + * Add utility class to support for rate limiting a given log statement (CASSANDRA-9029)
 + * Add missing consistency levels to cassandra-stess (CASSANDRA-9361)
 + * Fix commitlog getCompletedTasks to not increment (CASSANDRA-9339)
 + * Fix for harmless exceptions logged as ERROR (CASSANDRA-8564)
 + * Delete processed sstables in sstablesplit/sstableupgrade (CASSANDRA-8606)
 + * Improve sstable exclusion from partition tombstones (CASSANDRA-9298)
 + * Validate the indexed column rather than the cell's contents for 2i (CASSANDRA-9057)
 + * Add support for top-k custom 2i queries (CASSANDRA-8717)
 + * Fix error when dropping table during compaction (CASSANDRA-9251)
 + * cassandra-stress supports validation operations over user profiles (CASSANDRA-8773)
 + * Add support for rate limiting log messages (CASSANDRA-9029)
 + * Log the partition key with tombstone warnings (CASSANDRA-8561)
 + * Reduce runWithCompactionsDisabled poll interval to 1ms (CASSANDRA-9271)
 + * Fix PITR commitlog replay (CASSANDRA-9195)
 + * GCInspector logs very different times (CASSANDRA-9124)
 + * Fix deleting from an empty list (CASSANDRA-9198)
 + * Update tuple and collection types that use a user-defined type when that UDT
 +   is modified (CASSANDRA-9148, CASSANDRA-9192)
 + * Use higher timeout for prepair and snapshot in repair (CASSANDRA-9261)
 + * Fix anticompaction blocking ANTI_ENTROPY stage (CASSANDRA-9151)
 + * Repair waits for anticompaction to finish (CASSANDRA-9097)
 + * Fix streaming not holding ref when stream error (CASSANDRA-9295)
 + * Fix canonical view returning early opened SSTables (CASSANDRA-9396)
 +Merged from 2.0:
+  * Add broadcast and rpc addresses to system.local (CASSANDRA-9436)
   * Always mark sstable suspect when corrupted (CASSANDRA-9478)
   * Add database users and permissions to CQL3 documentation (CASSANDRA-7558)
   * Allow JVM_OPTS to be passed to standalone tools (CASSANDRA-5969)

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a90c80dd/src/java/org/apache/cassandra/db/SystemKeyspace.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/SystemKeyspace.java
index 5beb709,e439de7..882dbdf
--- a/src/java/org/apache/cassandra/db/SystemKeyspace.java
+++ b/src/java/org/apache/cassandra/db/SystemKeyspace.java
@@@ -129,35 -125,20 +129,37 @@@ public class SystemKeyspac
          ksmd.toSchema(FBUtilities.timestampMicros() + 1).apply();
      }
  
 -    // Starting with 2.0 (CASSANDRA-5125) we keep all the 'aliases' in system.schema_columns together with the regular columns,
 -    // but only for the newly-created tables. This migration is for the pre-2.0 created tables.
 -    private static void copyAllAliasesToColumnsProper()
 +    private static void setupVersion()
      {
-         String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version, native_protocol_version, data_center, rack, partitioner) VALUES (?, ?, ?, ?, ?, ?, ?, ?)";
 -        for (UntypedResultSet.Row row : processInternal(String.format("SELECT * FROM system.%s", SCHEMA_COLUMNFAMILIES_CF)))
++        String req = "INSERT INTO system.%s (key, release_version, cql_version, thrift_version, native_protocol_version, data_center, rack, partitioner, rpc_address, broadcast_address) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
 +        IEndpointSnitch snitch = DatabaseDescriptor.getEndpointSnitch();
 +        executeOnceInternal(String.format(req, LOCAL_CF),
 +                            LOCAL_KEY,
 +                            FBUtilities.getReleaseVersionString(),
 +                            QueryProcessor.CQL_VERSION.toString(),
 +                            cassandraConstants.VERSION,
 +                            String.valueOf(Server.CURRENT_VERSION),
 +                            snitch.getDatacenter(FBUtilities.getBroadcastAddress()),
 +                            snitch.getRack(FBUtilities.getBroadcastAddress()),
-                             DatabaseDescriptor.getPartitioner().getClass().getName());
++                            DatabaseDescriptor.getPartitioner().getClass().getName(),
++                            DatabaseDescriptor.getRpcAddress(),
++                            FBUtilities.getBroadcastAddress());
 +    }
 +
 +    // TODO: In 3.0, remove this and the index_interval column from system.schema_columnfamilies
 +    /** Migrates index_interval values to min_index_interval and sets index_interval to null */
 +    private static void migrateIndexInterval()
 +    {
 +        for (UntypedResultSet.Row row : executeOnceInternal(String.format("SELECT * FROM system.%s", SCHEMA_COLUMNFAMILIES_CF)))
          {
 +            if (!row.has("index_interval"))
 +                continue;
 +
 +            logger.debug("Migrating index_interval to min_index_interval");
 +
              CFMetaData table = CFMetaData.fromSchema(row);
 -            String query = String.format("SELECT writetime(type) "
 -                                         + "FROM system.%s "
 -                                         + "WHERE keyspace_name = '%s' AND columnfamily_name = '%s'",
 -                                         SCHEMA_COLUMNFAMILIES_CF,
 -                                         table.ksName,
 -                                         table.cfName);
 -            long timestamp = processInternal(query).one().getLong("writetime(type)");
 +            String query = String.format("SELECT writetime(type) FROM system.%s WHERE keyspace_name = ? AND columnfamily_name = ?", SCHEMA_COLUMNFAMILIES_CF);
 +            long timestamp = executeOnceInternal(query, table.ksName, table.cfName).one().getLong("writetime(type)");
              try
              {
                  table.toSchema(timestamp).apply();