[8/8] 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/df147cc0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/df147cc0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/df147cc0 Branch: refs/heads/trunk Commit: df147cc09a9697992923505b6918fbcf50c0f94a Parents: 7ef4ff3 aee02e4 Author: Michael Shuler Authored: Tue Oct 10 17:19:41 2017 -0500 Committer: Michael Shuler Committed: Tue Oct 10 17:19:41 2017 -0500 -- -- - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[8/8] 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/974d8fc0 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/974d8fc0 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/974d8fc0 Branch: refs/heads/trunk Commit: 974d8fc099c0f426eea2440783b03e35c13fe528 Parents: 00022bf 4734ce7 Author: Alex Petrov Authored: Mon Sep 25 09:42:24 2017 +0200 Committer: Alex Petrov Committed: Mon Sep 25 09:42:24 2017 +0200 -- -- - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[8/8] 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/00022bfa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/00022bfa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/00022bfa Branch: refs/heads/trunk Commit: 00022bfa61e3afd7869cc4b93dd85195a3530a89 Parents: 756fab8 3e3d56e Author: Paulo Motta Authored: Mon Sep 25 01:02:03 2017 -0500 Committer: Paulo Motta Committed: Mon Sep 25 01:29:46 2017 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/db/ColumnFamilyStore.java | 11 ++- .../cassandra/db/PartitionRangeReadCommand.java | 6 +- .../org/apache/cassandra/db/ReadCommand.java| 3 +- .../db/SinglePartitionReadCommand.java | 11 ++- .../apache/cassandra/db/filter/DataLimits.java | 87 ++-- .../db/partitions/CachedBTreePartition.java | 3 +- .../apache/cassandra/db/rows/AbstractRow.java | 6 +- src/java/org/apache/cassandra/db/rows/Row.java | 7 +- .../cassandra/db/view/ViewUpdateGenerator.java | 6 +- .../composites/ClusteringColumnIndex.java | 5 +- .../internal/composites/PartitionKeyIndex.java | 4 +- .../apache/cassandra/service/DataResolver.java | 6 +- .../apache/cassandra/service/StorageProxy.java | 12 ++- .../service/pager/AbstractQueryPager.java | 4 +- .../org/apache/cassandra/cql3/CachingBench.java | 3 +- .../cassandra/cql3/GcCompactionBench.java | 3 +- .../apache/cassandra/cql3/GcCompactionTest.java | 3 +- .../apache/cassandra/cql3/ViewComplexTest.java | 65 ++- .../org/apache/cassandra/cql3/ViewTest.java | 2 + .../apache/cassandra/db/RangeTombstoneTest.java | 35 +--- .../db/compaction/CompactionsPurgeTest.java | 3 +- 22 files changed, 222 insertions(+), 64 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/00022bfa/CHANGES.txt -- diff --cc CHANGES.txt index 7e3f657,8fc72fc..97e6b03 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -150,6 -11,6 +150,7 @@@ * Duplicate the buffer before passing it to analyser in SASI operation (CASSANDRA-13512) * Properly evict pstmts from prepared statements cache (CASSANDRA-13641) Merged from 3.0: ++ * Handle limit correctly on tables with strict liveness (CASSANDRA-13883) * Remove non-rpc-ready nodes from counter leader candidates (CASSANDRA-13043) * Improve short read protection performance (CASSANDRA-13794) * Fix sstable reader to support range-tombstone-marker for multi-slices (CASSANDRA-13787) http://git-wip-us.apache.org/repos/asf/cassandra/blob/00022bfa/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 72a63f0,1b01c3f..67270ad --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@@ -1632,7 -1615,7 +1632,11 @@@ public class ColumnFamilyStore implemen return data.getUncompacting(); } --public boolean isFilterFullyCoveredBy(ClusteringIndexFilter filter, DataLimits limits, CachedPartition cached, int nowInSec) ++public boolean isFilterFullyCoveredBy(ClusteringIndexFilter filter, ++ DataLimits limits, ++ CachedPartition cached, ++ int nowInSec, ++ boolean enforceStrictLiveness) { // We can use the cached value only if we know that no data it doesn't contain could be covered // by the query filter, that is if: @@@ -1650,7 -1633,10 +1654,10 @@@ // is not in the cache. We can guarantee that if either the filter is a "head filter" and the cached // partition has more live rows that queried (where live rows refers to the rows that are live now), // or if we can prove that everything the filter selects is in the cached partition based on its content. - return (filter.isHeadFilter() && limits.hasEnoughLiveData(cached, nowInSec, filter.selectsAllPartition())) + return (filter.isHeadFilter() && limits.hasEnoughLiveData(cached, + nowInSec, + filter.selectsAllPartition(), - metadata.enforceStrictLiveness())) ++ enforceStrictLiveness)) || filter.isFullyCoveredBy(cached); } http://git-wip-us.
[8/8] 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/65f7216c Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/65f7216c Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/65f7216c Branch: refs/heads/trunk Commit: 65f7216c642b8bdfef3b154d08d18e14302bf398 Parents: e6fb830 2b29f8a Author: Paulo Motta Authored: Tue Sep 5 02:47:36 2017 -0500 Committer: Paulo Motta Committed: Tue Sep 5 02:47:36 2017 -0500 -- CHANGES.txt | 1 + NEWS.txt| 16 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/65f7216c/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/65f7216c/NEWS.txt -- diff --cc NEWS.txt index 7d0fe9a,cb1143f..02a4117 --- a/NEWS.txt +++ b/NEWS.txt @@@ -13,64 -13,21 +13,76 @@@ 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 + - Preview expected streaming required for a repair (nodetool repair --preview), and validate the + consistency of repaired data between nodes (nodetool repair --validate). See CASSANDRA-13257 + - Support for selecting Map values and Set elements has been added for SELECT queries. See CASSANDRA-7396 + - Change-Data-Capture has been modified to make CommitLogSegments available + immediately upon creation via hard-linking the files. This means that incomplete + segments will be available in cdc_raw rather than fully flushed. See documentation + and CASSANDRA-12148 for more detail. + +Upgrading +- +- 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. + + 3.11.1 + == - Materialized Views - --- + Upgrading + --
[8/8] 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/38ae3068 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/38ae3068 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/38ae3068 Branch: refs/heads/trunk Commit: 38ae30685106d745c070114ad9916a9dfcc4ebaf Parents: 6e395dd 031d76c Author: Jason Brown Authored: Tue Aug 29 08:37:22 2017 -0700 Committer: Jason Brown Committed: Tue Aug 29 08:37:22 2017 -0700 -- -- - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[8/8] 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/4838e81a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4838e81a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4838e81a Branch: refs/heads/trunk Commit: 4838e81a64eb118d0f86463b61b43c450a199dc8 Parents: 41ef972 8d98a99 Author: Benjamin Lerer Authored: Thu Aug 24 18:23:02 2017 +0200 Committer: Benjamin Lerer Committed: Thu Aug 24 18:24:02 2017 +0200 -- CHANGES.txt | 1 + .../cassandra/db/SerializationHeader.java | 13 +- .../db/rows/AbstractTypeVersionComparator.java | 121 src/java/org/apache/cassandra/db/rows/Row.java | 18 +- src/java/org/apache/cassandra/db/rows/Rows.java | 20 +- .../io/sstable/format/SSTableReader.java| 20 +- .../org/apache/cassandra/cql3/CQLTester.java| 20 +- .../cql3/validation/entities/UserTypesTest.java | 151 +++ .../rows/AbstractTypeVersionComparatorTest.java | 188 +++ 9 files changed, 532 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4838e81a/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4838e81a/src/java/org/apache/cassandra/db/SerializationHeader.java -- diff --cc src/java/org/apache/cassandra/db/SerializationHeader.java index 1f937f8,ddf83b7..4266629 --- a/src/java/org/apache/cassandra/db/SerializationHeader.java +++ b/src/java/org/apache/cassandra/db/SerializationHeader.java @@@ -84,8 -84,9 +84,9 @@@ public class SerializationHeade // our stats merging on the compacted files headers, which as we just said can be somewhat inaccurate, // but rather on their stats stored in StatsMetadata that are fully accurate. EncodingStats.Collector stats = new EncodingStats.Collector(); -PartitionColumns.Builder columns = PartitionColumns.builder(); -// We need to order the SSTables by descending generation to be sure that we use latest column definitions. +RegularAndStaticColumns.Builder columns = RegularAndStaticColumns.builder(); - for (SSTableReader sstable : sstables) ++// We need to order the SSTables by descending generation to be sure that we use latest column metadata. + for (SSTableReader sstable : orderByDescendingGeneration(sstables)) { stats.updateTimestamp(sstable.getMinTimestamp()); stats.updateLocalDeletionTime(sstable.getMinLocalDeletionTime()); @@@ -95,9 -99,19 +96,19 @@@ return new SerializationHeader(true, metadata, columns.build(), stats.get()); } + private static Collection orderByDescendingGeneration(Collection sstables) + { + if (sstables.size() < 2) + return sstables; + + List readers = new ArrayList<>(sstables); + readers.sort(SSTableReader.generationReverseComparator); + return readers; + } + public SerializationHeader(boolean isForSSTable, - CFMetaData metadata, - PartitionColumns columns, + TableMetadata metadata, + RegularAndStaticColumns columns, EncodingStats stats) { this(isForSSTable, http://git-wip-us.apache.org/repos/asf/cassandra/blob/4838e81a/src/java/org/apache/cassandra/db/rows/Row.java -- diff --cc src/java/org/apache/cassandra/db/rows/Row.java index 7449e51,60ee4d4..5999864 --- a/src/java/org/apache/cassandra/db/rows/Row.java +++ b/src/java/org/apache/cassandra/db/rows/Row.java @@@ -721,10 -721,25 +721,25 @@@ public interface Row extends Unfiltered public void reduce(int idx, ColumnData data) { - column = data.column(); -if (useColumnDefinition(data.column())) ++if (useColumnMetadata(data.column())) + column = data.column(); + versions.add(data); } + /** - * Determines it the {@code ColumnDefinition} is the one that should be used. - * @param dataColumn the {@code ColumnDefinition} to use. - * @return {@code true} if the {@code ColumnDefinition} is the one that should be used, {@code false} otherwise. ++ * Determines it the {@code ColumnMetadata} is the one that should be used. ++ * @param dataColumn the {@code ColumnMetadata} to use. ++ * @return {@
[8/8] 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/cad94165 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cad94165 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cad94165 Branch: refs/heads/trunk Commit: cad941653b59c4609ba2900cda86dc366d3ccd38 Parents: 6dfd11c 47a2839 Author: AndreÌs de la PenÌa Authored: Tue Aug 8 15:27:15 2017 +0100 Committer: AndreÌs de la PenÌa Committed: Tue Aug 8 15:27:15 2017 +0100 -- CHANGES.txt | 1 + .../apache/cassandra/db/rows/AbstractCell.java | 2 +- .../org/apache/cassandra/db/rows/BTreeRow.java | 2 +- .../apache/cassandra/schema/ColumnMetadata.java | 21 ++--- .../apache/cassandra/tools/JsonTransformer.java | 32 +-- .../org/apache/cassandra/cql3/ViewTest.java | 33 .../cassandra/index/sasi/SASIIndexTest.java | 14 + 7 files changed, 96 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cad94165/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cad94165/src/java/org/apache/cassandra/db/rows/AbstractCell.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cad94165/src/java/org/apache/cassandra/db/rows/BTreeRow.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cad94165/src/java/org/apache/cassandra/schema/ColumnMetadata.java -- diff --cc src/java/org/apache/cassandra/schema/ColumnMetadata.java index ea80708,000..3b55c03 mode 100644,00..100644 --- a/src/java/org/apache/cassandra/schema/ColumnMetadata.java +++ b/src/java/org/apache/cassandra/schema/ColumnMetadata.java @@@ -1,626 -1,0 +1,639 @@@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.cassandra.schema; + +import java.nio.ByteBuffer; +import java.util.*; +import java.util.function.Predicate; + +import com.google.common.annotations.VisibleForTesting; +import com.google.common.base.MoreObjects; +import com.google.common.base.Objects; +import com.google.common.collect.Collections2; + +import org.apache.cassandra.cql3.*; +import org.apache.cassandra.cql3.selection.Selectable; +import org.apache.cassandra.cql3.selection.Selector; +import org.apache.cassandra.cql3.selection.SimpleSelector; +import org.apache.cassandra.db.rows.*; +import org.apache.cassandra.db.marshal.*; +import org.apache.cassandra.exceptions.InvalidRequestException; +import org.apache.cassandra.serializers.MarshalException; +import org.apache.cassandra.utils.ByteBufferUtil; +import org.github.jamm.Unmetered; + +@Unmetered +public final class ColumnMetadata extends ColumnSpecification implements Selectable, Comparable +{ +public static final Comparator asymmetricColumnDataComparator = +(a, b) -> ((ColumnData) a).column().compareTo((ColumnMetadata) b); + +public static final int NO_POSITION = -1; + +public enum ClusteringOrder +{ +ASC, DESC, NONE +} + +/** + * The type of CQL3 column this definition represents. + * There is 4 main type of CQL3 columns: those parts of the partition key, + * those parts of the clustering columns and amongst the others, regular and + * static ones. + * + * IMPORTANT: this enum is serialized as toString() and deserialized by calling + * Kind.valueOf(), so do not override toString() or rename existing values. + */ +public enum Kind +{ +// NOTE: if adding a new type, must modify comparisonOrder +PARTITION_KEY, +CLUSTERING, +REGULAR, +STATIC; + +public boolean isPrimaryKeyKind() +{ +return thi
[8/8] 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/e0ce6ce7 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e0ce6ce7 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e0ce6ce7 Branch: refs/heads/trunk Commit: e0ce6ce77d38db1890c5f2bccba1f19fdfe256be Parents: 465cfd5 7aa89a6 Author: Benjamin Lerer Authored: Fri Jul 14 17:21:19 2017 +0200 Committer: Benjamin Lerer Committed: Fri Jul 14 17:23:36 2017 +0200 -- CHANGES.txt | 7 +- .../apache/cassandra/db/ColumnFamilyStore.java | 3 +- src/java/org/apache/cassandra/db/DataRange.java | 5 + .../cassandra/db/PartitionRangeReadCommand.java | 6 + .../org/apache/cassandra/db/ReadCommand.java| 2 +- src/java/org/apache/cassandra/db/ReadQuery.java | 12 + .../db/SinglePartitionReadCommand.java | 21 +- .../apache/cassandra/db/filter/DataLimits.java | 73 +++-- .../apache/cassandra/db/filter/RowFilter.java | 15 + .../apache/cassandra/service/CacheService.java | 2 +- .../apache/cassandra/service/DataResolver.java | 4 +- .../apache/cassandra/service/StorageProxy.java | 8 +- .../service/pager/AbstractQueryPager.java | 2 +- .../service/pager/MultiPartitionPager.java | 9 +- .../org/apache/cassandra/cql3/CQLTester.java| 8 +- .../validation/operations/SelectLimitTest.java | 279 +++ .../db/rows/UnfilteredRowIteratorsTest.java | 10 +- 17 files changed, 412 insertions(+), 54 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/CHANGES.txt -- diff --cc CHANGES.txt index 70aae21,edd66e2..44b8ce8 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -105,9 -9,9 +105,10 @@@ Merged from 3.0 * Fix secondary index queries on COMPACT tables (CASSANDRA-13627) * Nodetool listsnapshots output is missing a newline, if there are no snapshots (CASSANDRA-13568) Merged from 2.2: - * Fix potential NPE when resume bootstrap fails (CASSANDRA-13272) - * Fix toJSONString for the UDT, tuple and collection types (CASSANDRA-13592) - * Fix nested Tuples/UDTs validation (CASSANDRA-13646) + * Fix queries with LIMIT and filtering on clustering columns (CASSANDRA-11223) + * Fix potential NPE when resume bootstrap fails (CASSANDRA-13272) - * Fix toJSONString for the UDT, tuple and collection types (CASSANDRA-13592) * Fix nested Tuples/UDTs validation (CASSANDRA-13646) ++ * Fix toJSONString for the UDT, tuple and collection types (CASSANDRA-13592) ++ * Fix nested Tuples/UDTs validation (CASSANDRA-13646) 3.11.0 * Allow native function calls in CQLSSTableWriter (CASSANDRA-12606) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/src/java/org/apache/cassandra/db/DataRange.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java -- diff --cc src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java index bc80907,c3d6e05..1f54f16 --- a/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java +++ b/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java @@@ -327,10 -331,17 +327,16 @@@ public class PartitionRangeReadCommand } @Override + public boolean selectsFullPartition() + { + return dataRange.selectsAllPartition() && !rowFilter().hasExpressionOnClusteringOrRegularColumns(); + } + + @Override public String toString() { -return String.format("Read(%s.%s columns=%s rowfilter=%s limits=%s %s)", - metadata().ksName, - metadata().cfName, +return String.format("Read(%s columns=%s rowfilter=%s limits=%s %s)", + metadata().toString(), columnFilter(), rowFilter(), limits(), http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/src/java/org/apache/cassandra/db/ReadCommand.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/src/java/org/apache/cassandra/db/ReadQuery.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0ce6ce7/src/java/org/apache/cassandra/db/Si
[8/8] 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/96899bbb Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/96899bbb Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/96899bbb Branch: refs/heads/trunk Commit: 96899bbb60ebba05408c3248e756ed33605e8075 Parents: a741efd 5c9db9a Author: Benjamin Lerer Authored: Thu Jun 1 10:20:29 2017 +0200 Committer: Benjamin Lerer Committed: Thu Jun 1 10:22:54 2017 +0200 -- CHANGES.txt | 1 + NEWS.txt| 2 + doc/source/operating/metrics.rst| 2 +- .../cassandra/db/PartitionRangeReadCommand.java | 20 - .../db/SinglePartitionReadCommand.java | 83 ++-- .../org/apache/cassandra/db/StorageHook.java| 53 - .../UnfilteredRowIteratorWithLowerBound.java| 10 ++- .../io/sstable/format/SSTableReader.java| 62 +-- .../io/sstable/format/SSTableReadsListener.java | 81 +++ .../io/sstable/format/big/BigTableReader.java | 33 +--- .../io/sstable/format/big/BigTableScanner.java | 23 -- .../miscellaneous/SSTablesIteratedTest.java | 69 +++- .../cassandra/db/compaction/TTLExpiryTest.java | 5 +- .../sstable/SSTableCorruptionDetectionTest.java | 7 +- .../io/sstable/SSTableScannerTest.java | 5 +- .../cassandra/io/sstable/SSTableWriterTest.java | 7 +- 16 files changed, 369 insertions(+), 94 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/96899bbb/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/96899bbb/NEWS.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/96899bbb/doc/source/operating/metrics.rst -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/96899bbb/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java -- diff --cc src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java index a47302b,aa8271d..bc80907 --- a/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java +++ b/src/java/org/apache/cassandra/db/PartitionRangeReadCommand.java @@@ -206,16 -209,17 +207,17 @@@ public class PartitionRangeReadCommand for (Memtable memtable : view.memtables) { @SuppressWarnings("resource") // We close on exception and on closing the result returned by this method -Memtable.MemtableUnfilteredPartitionIterator iter = memtable.makePartitionIterator(columnFilter(), dataRange(), isForThrift()); +Memtable.MemtableUnfilteredPartitionIterator iter = memtable.makePartitionIterator(columnFilter(), dataRange()); oldestUnrepairedTombstone = Math.min(oldestUnrepairedTombstone, iter.getMinLocalDeletionTime()); -iterators.add(isForThrift() ? ThriftResultsMerger.maybeWrap(iter, metadata(), nowInSec()) : iter); +iterators.add(iter); } + SSTableReadsListener readCountUpdater = newReadCountUpdater(); for (SSTableReader sstable : view.sstables) { @SuppressWarnings("resource") // We close on exception and on closing the result returned by this method - UnfilteredPartitionIterator iter = sstable.getScanner(columnFilter(), dataRange()); -UnfilteredPartitionIterator iter = sstable.getScanner(columnFilter(), dataRange(), isForThrift(), readCountUpdater); -iterators.add(isForThrift() ? ThriftResultsMerger.maybeWrap(iter, metadata(), nowInSec()) : iter); ++UnfilteredPartitionIterator iter = sstable.getScanner(columnFilter(), dataRange(), readCountUpdater); +iterators.add(iter); if (!sstable.isRepaired()) oldestUnrepairedTombstone = Math.min(oldestUnrepairedTombstone, sstable.getMinLocalDeletionTime()); } http://git-wip-us.apache.org/repos/asf/cassandra/blob/96899bbb/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java -- diff --cc src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java index d5d2901,47c426e..5ebfdcc --- a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java +++ b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java @@@ -567,7 -600,7 +569,7 @@@ public class SinglePartitionReadComman @S
[8/8] 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/522ddba2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/522ddba2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/522ddba2 Branch: refs/heads/trunk Commit: 522ddba275926761bf2870b67664cf318401f158 Parents: 633babf be96c28 Author: T Jake Luciani Authored: Tue Apr 4 12:48:01 2017 -0400 Committer: T Jake Luciani Committed: Tue Apr 4 12:48:01 2017 -0400 -- CHANGES.txt | 5 +- src/java/org/apache/cassandra/db/view/View.java | 5 ++ .../apache/cassandra/db/view/ViewBuilder.java | 51 + .../org/apache/cassandra/cql3/ViewTest.java | 59 4 files changed, 95 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/522ddba2/CHANGES.txt -- diff --cc CHANGES.txt index 3147eb9,1ca8733..ffe958d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -70,7 -19,11 +70,10 @@@ * NoReplicationTokenAllocator should work with zero replication factor (CASSANDRA-12983) * Address message coalescing regression (CASSANDRA-12676) Merged from 3.0: + * Fix view builder bug that can filter out data on restart (CASSANDRA-13405) + * Fix 2i page size calculation when there are no regular columns (CASSANDRA-13400) + * Fix the conversion of 2.X expired rows without regular column data (CASSANDRA-13395) * Fix hint delivery when using ext+internal IPs with prefer_local enabled (CASSANDRA-13020) - * Fix possible NPE on upgrade to 3.0/3.X in case of IO errors (CASSANDRA-13389) * Legacy deserializer can create empty range tombstones (CASSANDRA-13341) * Legacy caching options can prevent 3.0 upgrade (CASSANDRA-13384) * Use the Kernel32 library to retrieve the PID on Windows and fix startup checks (CASSANDRA-1) http://git-wip-us.apache.org/repos/asf/cassandra/blob/522ddba2/src/java/org/apache/cassandra/db/view/View.java -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/522ddba2/src/java/org/apache/cassandra/db/view/ViewBuilder.java -- diff --cc src/java/org/apache/cassandra/db/view/ViewBuilder.java index 6250ae7,8e647ea..af86392 --- a/src/java/org/apache/cassandra/db/view/ViewBuilder.java +++ b/src/java/org/apache/cassandra/db/view/ViewBuilder.java @@@ -96,9 -101,10 +101,10 @@@ public class ViewBuilder extends Compac public void run() { + logger.debug("Starting view builder for {}.{}", baseCfs.metadata.ksName, view.name); -logger.trace("Running view builder for {}.{}", baseCfs.metadata.ksName, view.name); +logger.trace("Running view builder for {}.{}", baseCfs.metadata.keyspace, view.name); UUID localHostId = SystemKeyspace.getLocalHostId(); -String ksname = baseCfs.metadata.ksName, viewName = view.name; +String ksname = baseCfs.metadata.keyspace, viewName = view.name; if (SystemKeyspace.isViewBuilt(ksname, viewName)) { @@@ -222,7 -225,8 +224,8 @@@ if (lastToken == null || range.contains(lastToken)) rangesLeft = 0; } + -return new CompactionInfo(baseCfs.metadata, OperationType.VIEW_BUILD, rangesLeft, rangesTotal, "ranges", compactionId); +return new CompactionInfo(baseCfs.metadata(), OperationType.VIEW_BUILD, rangesLeft, rangesTotal, "ranges", compactionId); } public void stop() http://git-wip-us.apache.org/repos/asf/cassandra/blob/522ddba2/test/unit/org/apache/cassandra/cql3/ViewTest.java --
[8/8] 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/45c92ba9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/45c92ba9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/45c92ba9 Branch: refs/heads/trunk Commit: 45c92ba91b5b113ca6da4bb438112a94a8030232 Parents: ded6b70 8fc72a5 Author: Aleksey Yeschenko Authored: Sun Feb 5 17:03:07 2017 + Committer: Aleksey Yeschenko Committed: Sun Feb 5 17:08:53 2017 + -- CHANGES.txt | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/45c92ba9/CHANGES.txt -- diff --cc CHANGES.txt index 2076c8f,65efebc..ee9c14e --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,35 -1,10 +1,38 @@@ +4.0 + * Make TableMetadata immutable, optimize Schema (CASSANDRA-9425) + * Refactor ColumnCondition (CASSANDRA-12981) + * Parallelize streaming of different keyspaces (CASSANDRA-4663) + * Improved compactions metrics (CASSANDRA-13015) + * Speed-up start-up sequence by avoiding un-needed flushes (CASSANDRA-13031) + * Use Caffeine (W-TinyLFU) for on-heap caches (CASSANDRA-10855) + * Thrift removal (CASSANDRA-5) + * Remove pre-3.0 compatibility code for 4.0 (CASSANDRA-12716) + * Add column definition kind to dropped columns in schema (CASSANDRA-12705) + * Add (automate) Nodetool Documentation (CASSANDRA-12672) + * Update bundled cqlsh python driver to 3.7.0 (CASSANDRA-12736) + * Reject invalid replication settings when creating or altering a keyspace (CASSANDRA-12681) + * Clean up the SSTableReader#getScanner API wrt removal of RateLimiter (CASSANDRA-12422) + * Use new token allocation for non bootstrap case as well (CASSANDRA-13080) + * Avoid byte-array copy when key cache is disabled (CASSANDRA-13084) - * More fixes to the TokenAllocator (CASSANDRA-12990) + * Require forceful decommission if number of nodes is less than replication factor (CASSANDRA-12510) + * Allow IN restrictions on column families with collections (CASSANDRA-12654) - * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034) - * nodetool stopdaemon errors out (CASSANDRA-13030) + * Log message size in trace message in OutboundTcpConnection (CASSANDRA-13028) + * Add timeUnit Days for cassandra-stress (CASSANDRA-13029) + * Add mutation size and batch metrics (CASSANDRA-12649) + * Add method to get size of endpoints to TokenMetadata (CASSANDRA-12999) - * Fix primary index calculation for SASI (CASSANDRA-12910) + * Expose time spent waiting in thread pool queue (CASSANDRA-8398) + * Conditionally update index built status to avoid unnecessary flushes (CASSANDRA-12969) - * NoReplicationTokenAllocator should work with zero replication factor (CASSANDRA-12983) + * cqlsh auto completion: refactor definition of compaction strategy options (CASSANDRA-12946) + * Add support for arithmetic operators (CASSANDRA-11935) ++ ++ + 3.11.0 + * Move to FastThreadLocalThread and FastThreadLocal (CASSANDRA-13034) + * nodetool stopdaemon errors out (CASSANDRA-13030) * Tables in system_distributed should not use gcgs of 0 (CASSANDRA-12954) + * Fix primary index calculation for SASI (CASSANDRA-12910) + * More fixes to the TokenAllocator (CASSANDRA-12990) + * NoReplicationTokenAllocator should work with zero replication factor (CASSANDRA-12983) Merged from 3.0: * Fix handling of partition with partition-level deletion plus live rows in sstabledump (CASSANDRA-13177)