cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdeggles...@apache.org
Subject [6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Date Thu, 26 Oct 2017 21:07:12 GMT
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/569c6abc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/569c6abc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/569c6abc

Branch: refs/heads/trunk
Commit: 569c6abcfa50901fdf73d0b6e89cc1562e698c43
Parents: af2c784 ea443df
Author: Blake Eggleston <bdeggleston@gmail.com>
Authored: Thu Oct 26 14:06:24 2017 -0700
Committer: Blake Eggleston <bdeggleston@gmail.com>
Committed: Thu Oct 26 14:06:24 2017 -0700

----------------------------------------------------------------------
 CHANGES.txt                                        |  1 +
 NEWS.txt                                           |  8 ++++++++
 conf/cassandra.yaml                                |  4 ++++
 src/java/org/apache/cassandra/config/Config.java   |  3 +++
 .../cassandra/config/DatabaseDescriptor.java       |  5 +++++
 .../cql3/statements/CreateViewStatement.java       | 17 +++++++++++++++++
 6 files changed, 38 insertions(+)
----------------------------------------------------------------------


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/569c6abc/NEWS.txt
----------------------------------------------------------------------
diff --cc NEWS.txt
index 02a4117,f8dd93b..7a133b8
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -33,41 -18,16 +33,49 @@@ New feature
  
  Upgrading
  ---------
 -    - Nothing specific to this release, but please see previous upgrading sections.
 +    - Support for legacy auth tables in the system_auth keyspace (users,
 +      permissions, credentials) and the migration code has been removed. Migration
 +      of these legacy auth tables must have been completed before the upgrade to
 +      4.0 and the legacy tables must have been removed. See the 'Upgrading' section
 +      for version 2.2 for migration instructions.
 +    - 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. If incremental repair was being used
 +      prior to upgrading, a full repair should be run after upgrading to resolve
 +      any inconsistencies.
 +    - Config option index_interval has been removed (it was deprecated since 2.0)
 +    - Deprecated repair JMX APIs are removed.
 +    - The version of snappy-java has been upgraded to 1.1.2.6
 +	- the miniumum value for internode message timeouts is 10ms. Previously, any
 +	  positive value was allowed. See cassandra.yaml entries like
 +	  read_request_timeout_in_ms for more details.
  
+ Materialized Views
+ -------------------
+    - Following a discussion regarding concerns about the design and safety of Materialized
Views, the C* development
+      community no longer recommends them for production use, and considers them experimental.
Warnings messages will
+      now be logged when they are created. (See https://www.mail-archive.com/dev@cassandra.apache.org/msg11511.html)
+    - An 'enable_materialized_views' flag has been added to cassandra.yaml to allow operators
to prevent creation of
+      views
+ 
  3.11.1
  ======
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/569c6abc/conf/cassandra.yaml
----------------------------------------------------------------------

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

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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/569c6abc/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
index f7bd1cf,3d53ac4..2b707a7
--- a/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
+++ b/src/java/org/apache/cassandra/cql3/statements/CreateViewStatement.java
@@@ -24,7 -24,15 +24,11 @@@ import java.util.stream.Collectors
  import com.google.common.collect.Iterables;
  import com.google.common.collect.Sets;
  
+ import org.slf4j.Logger;
+ import org.slf4j.LoggerFactory;
+ 
  import org.apache.cassandra.auth.Permission;
 -import org.apache.cassandra.config.CFMetaData;
 -import org.apache.cassandra.config.ColumnDefinition;
+ import org.apache.cassandra.config.DatabaseDescriptor;
 -import org.apache.cassandra.config.Schema;
 -import org.apache.cassandra.config.ViewDefinition;
  import org.apache.cassandra.cql3.*;
  import org.apache.cassandra.cql3.restrictions.StatementRestrictions;
  import org.apache.cassandra.cql3.selection.RawSelector;
@@@ -37,14 -45,12 +41,15 @@@ import org.apache.cassandra.exceptions.
  import org.apache.cassandra.exceptions.InvalidRequestException;
  import org.apache.cassandra.exceptions.RequestValidationException;
  import org.apache.cassandra.exceptions.UnauthorizedException;
 +import org.apache.cassandra.schema.ColumnMetadata;
 +import org.apache.cassandra.schema.MigrationManager;
 +import org.apache.cassandra.schema.Schema;
 +import org.apache.cassandra.schema.TableMetadata;
  import org.apache.cassandra.schema.TableParams;
 +import org.apache.cassandra.schema.ViewMetadata;
  import org.apache.cassandra.service.ClientState;
+ import org.apache.cassandra.service.ClientWarn;
 -import org.apache.cassandra.service.MigrationManager;
  import org.apache.cassandra.service.QueryState;
 -import org.apache.cassandra.thrift.ThriftValidation;
  import org.apache.cassandra.transport.Event;
  
  public class CreateViewStatement extends SchemaAlteringStatement
@@@ -300,26 -311,29 +312,31 @@@
                                                "the corresponding data in the parent table.");
          }
  
 -        CFMetaData.Builder cfmBuilder = CFMetaData.Builder.createView(keyspace(), columnFamily());
 -        add(cfm, targetPartitionKeys, cfmBuilder::addPartitionKey);
 -        add(cfm, targetClusteringColumns, cfmBuilder::addClusteringColumn);
 -        add(cfm, includedColumns, cfmBuilder::addRegularColumn);
 -        cfmBuilder.withId(properties.properties.getId());
 -
 -        CFMetaData viewCfm = cfmBuilder.build().params(params);
 -        ViewDefinition definition = new ViewDefinition(keyspace(),
 -                                                       columnFamily(),
 -                                                       Schema.instance.getId(keyspace(),
baseName.getColumnFamily()),
 -                                                       baseName.getColumnFamily(),
 -                                                       included.isEmpty(),
 -                                                       rawSelect,
 -                                                       whereClauseText,
 -                                                       viewCfm);
 +        TableMetadata.Builder builder =
 +            TableMetadata.builder(keyspace(), columnFamily(), properties.properties.getId())
 +                         .isView(true)
 +                         .params(params);
 +
 +        add(metadata, targetPartitionKeys, builder::addPartitionKeyColumn);
 +        add(metadata, targetClusteringColumns, builder::addClusteringColumn);
 +        add(metadata, includedColumns, builder::addRegularColumn);
 +
 +        ViewMetadata definition = new ViewMetadata(keyspace(),
 +                                                   columnFamily(),
 +                                                   metadata.id,
 +                                                   metadata.name,
 +                                                   included.isEmpty(),
 +                                                   rawSelect,
 +                                                   whereClauseText,
 +                                                   builder.build());
  
+         logger.warn("Creating materialized view {} for {}.{}. " +
+                     "Materialized views are experimental and are not recommended for production
use.",
 -                    definition.viewName, cfm.ksName, cfm.cfName);
++                    definition.name, metadata.keyspace, metadata.name);
+ 
          try
          {
+             ClientWarn.instance.warn("Materialized views are experimental and are not recommended
for production use.");
              MigrationManager.announceNewView(definition, isLocalOnly);
              return new Event.SchemaChange(Event.SchemaChange.Change.CREATED, Event.SchemaChange.Target.TABLE,
keyspace(), columnFamily());
          }


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


Mime
View raw message