You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2013/10/13 18:14:09 UTC
[8/9] git commit: merge from 1.2
merge from 1.2
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/53b2d9d5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/53b2d9d5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/53b2d9d5
Branch: refs/heads/trunk
Commit: 53b2d9d55acf841f74812efbc35af42990e01718
Parents: 67bbdba 7290abd
Author: Jonathan Ellis <jb...@apache.org>
Authored: Sun Oct 13 11:13:15 2013 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Sun Oct 13 11:13:15 2013 -0500
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../org/apache/cassandra/config/CFMetaData.java | 10 ++++++++--
.../apache/cassandra/db/ColumnFamilyStore.java | 8 ++------
.../AbstractSimplePerColumnSecondaryIndex.java | 19 -------------------
.../org/apache/cassandra/utils/StatusLogger.java | 2 +-
5 files changed, 12 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/53b2d9d5/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 0fc2a91,7f43031..4668ae2
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -47,43 -22,10 +47,44 @@@ Merged from 1.2
* Handle JMX notification failure for repair (CASSANDRA-6097)
* (Hadoop) Fetch no more than 128 splits in parallel (CASSANDRA-6169)
* stress: add username/password authentication support (CASSANDRA-6068)
+ * Fix indexed queries with row cache enabled on parent table (CASSANDRA-5732)
-1.2.10
+2.0.1
+ * Fix bug that could allow reading deleted data temporarily (CASSANDRA-6025)
+ * Improve memory use defaults (CASSANDRA-5069)
+ * Make ThriftServer more easlly extensible (CASSANDRA-6058)
+ * Remove Hadoop dependency from ITransportFactory (CASSANDRA-6062)
+ * add file_cache_size_in_mb setting (CASSANDRA-5661)
+ * Improve error message when yaml contains invalid properties (CASSANDRA-5958)
+ * Improve leveled compaction's ability to find non-overlapping L0 compactions
+ to work on concurrently (CASSANDRA-5921)
+ * Notify indexer of columns shadowed by range tombstones (CASSANDRA-5614)
+ * Log Merkle tree stats (CASSANDRA-2698)
+ * Switch from crc32 to adler32 for compressed sstable checksums (CASSANDRA-5862)
+ * Improve offheap memcpy performance (CASSANDRA-5884)
+ * Use a range aware scanner for cleanup (CASSANDRA-2524)
+ * Cleanup doesn't need to inspect sstables that contain only local data
+ (CASSANDRA-5722)
+ * Add ability for CQL3 to list partition keys (CASSANDRA-4536)
+ * Improve native protocol serialization (CASSANDRA-5664)
+ * Upgrade Thrift to 0.9.1 (CASSANDRA-5923)
+ * Require superuser status for adding triggers (CASSANDRA-5963)
+ * Make standalone scrubber handle old and new style leveled manifest
+ (CASSANDRA-6005)
+ * Fix paxos bugs (CASSANDRA-6012, 6013, 6023)
+ * Fix paged ranges with multiple replicas (CASSANDRA-6004)
+ * Fix potential AssertionError during tracing (CASSANDRA-6041)
+ * Fix NPE in sstablesplit (CASSANDRA-6027)
+ * Migrate pre-2.0 key/value/column aliases to system.schema_columns
+ (CASSANDRA-6009)
+ * Paging filter empty rows too agressively (CASSANDRA-6040)
+ * Support variadic parameters for IN clauses (CASSANDRA-4210)
+ * cqlsh: return the result of CAS writes (CASSANDRA-5796)
+ * Fix validation of IN clauses with 2ndary indexes (CASSANDRA-6050)
+ * Support named bind variables in CQL (CASSANDRA-6033)
+Merged from 1.2:
+ * Allow cache-keys-to-save to be set at runtime (CASSANDRA-5980)
* Avoid second-guessing out-of-space state (CASSANDRA-5605)
* Tuning knobs for dealing with large blobs and many CFs (CASSANDRA-5982)
* (Hadoop) Fix CQLRW for thrift tables (CASSANDRA-6002)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/53b2d9d5/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/CFMetaData.java
index bbea21e,fcbd012..374f4a5
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@@ -445,18 -304,18 +445,24 @@@ public final class CFMetaDat
public CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?> comp, AbstractType<?> subcc)
{
- this(keyspace, name, type, comp, subcc, getId(keyspace, name));
+ this(keyspace, name, type, makeComparator(type, comp, subcc));
}
- CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?> comp, AbstractType<?> subcc, UUID id)
+ public CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?> comp)
+ {
+ this(keyspace, name, type, comp, getId(keyspace, name));
+ }
+
+ @VisibleForTesting
+ CFMetaData(String keyspace, String name, ColumnFamilyType type, AbstractType<?> comp, UUID id)
{
- // Final fields must be set in constructor
+ assert keyspace != null;
+ assert name != null;
+ assert type != null;
+ assert id != null;
+ // (subcc may be null for non-supercolumns)
+ // (comp may also be null for custom indexes, which is kind of broken if you ask me)
+
ksName = keyspace;
cfName = name;
cfType = type;
http://git-wip-us.apache.org/repos/asf/cassandra/blob/53b2d9d5/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 117df6f,39359b7..597ca53
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -1266,15 -1188,10 +1266,11 @@@ public class ColumnFamilyStore implemen
long start = System.nanoTime();
try
{
+ int gcBefore = gcBefore(filter.timestamp);
if (isRowCacheEnabled())
{
- UUID cfId = Schema.instance.getId(keyspace.getName(), name);
- if (cfId == null)
- {
- logger.trace("no id found for {}.{}", keyspace.getName(), name);
- return null;
- }
+ assert !isIndex(); // CASSANDRA-5732
+ UUID cfId = metadata.cfId;
ColumnFamily cached = getThroughCache(cfId, filter);
if (cached == null)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/53b2d9d5/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
index afc7409,caa7e20..8b12575
--- a/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
+++ b/src/java/org/apache/cassandra/db/index/AbstractSimplePerColumnSecondaryIndex.java
@@@ -53,30 -49,11 +53,11 @@@ public abstract class AbstractSimplePer
indexedCfMetadata.cfName,
new LocalPartitioner(columnDef.getValidator()),
indexedCfMetadata);
-
- // enable and initialize row cache based on parent's setting and indexed column's cardinality
- CFMetaData.Caching baseCaching = baseCfs.metadata.getCaching();
- if (baseCaching == CFMetaData.Caching.ALL || baseCaching == CFMetaData.Caching.ROWS_ONLY)
- {
- /*
- * # of index CF's key = cardinality of indexed column.
- * if # of keys stored in index CF is more than average column counts (means tall keyspaceName),
- * then consider it as high cardinality.
- */
- double estimatedKeys = indexCfs.estimateKeys();
- double averageColumnCount = indexCfs.getMeanColumns();
- if (averageColumnCount > 0 && estimatedKeys / averageColumnCount > 1)
- {
- logger.debug("turning row cache on for " + indexCfs.name);
- indexCfs.metadata.caching(baseCaching);
- indexCfs.initRowCache();
- }
- }
}
- protected abstract void init(ColumnDefinition columnDef);
+ protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, Column column);
- protected abstract ByteBuffer makeIndexColumnName(ByteBuffer rowKey, IColumn column);
+ protected abstract ByteBuffer getIndexedValue(ByteBuffer rowKey, Column column);
protected abstract AbstractType getExpressionComparator();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/53b2d9d5/src/java/org/apache/cassandra/utils/StatusLogger.java
----------------------------------------------------------------------