Merge branch 'cassandra-1.0' into cassandra-1.1
Conflicts:
src/java/org/apache/cassandra/config/CFMetaData.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4ec0990a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4ec0990a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4ec0990a
Branch: refs/heads/trunk
Commit: 4ec0990a4dd108f45965c189d1e3987261046986
Parents: ac8bbb1 5aad64a
Author: Sylvain Lebresne <[email protected]>
Authored: Fri Jun 8 09:25:28 2012 +0200
Committer: Sylvain Lebresne <[email protected]>
Committed: Fri Jun 8 09:25:28 2012 +0200
----------------------------------------------------------------------
CHANGES.txt | 2 ++
.../org/apache/cassandra/config/CFMetaData.java | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ec0990a/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 5a3bf5d,1fe21aa..e4c899c
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,91 -1,4 +1,93 @@@
-1.0.11
+1.1.2
+ * enforce 1m min keycache for auto (CASSANDRA-4306)
+ * Have DeletedColumn.isMFD always return true (CASSANDRA-4307)
++Merged from 1.0:
++ * Set gc_grace on index CF to 0 (CASSANDRA-4314)
+
+
+1.1.1
+ * add getsstables command to nodetool (CASSANDRA-4199)
+ * apply parent CF compaction settings to secondary index CFs (CASSANDRA-4280)
+ * preserve commitlog size cap when recycling segments at startup
+ (CASSANDRA-4201)
+ * (Hadoop) fix split generation regression (CASSANDRA-4259)
+ * ignore min/max compactions settings in LCS, while preserving
+ behavior that min=max=0 disables autocompaction (CASSANDRA-4233)
+ * log number of rows read from saved cache (CASSANDRA-4249)
+ * calculate exact size required for cleanup operations (CASSANDRA-1404)
+ * avoid blocking additional writes during flush when the commitlog
+ gets behind temporarily (CASSANDRA-1991)
+ * enable caching on index CFs based on data CF cache setting (CASSANDRA-4197)
+ * warn on invalid replication strategy creation options (CASSANDRA-4046)
+ * remove [Freeable]Memory finalizers (CASSANDRA-4222)
+ * include tombstone size in ColumnFamily.size, which can prevent OOM
+ during sudden mass delete operations by yielding a nonzero liveRatio
+ (CASSANDRA-3741)
+ * Open 1 sstableScanner per level for leveled compaction (CASSANDRA-4142)
+ * Optimize reads when row deletion timestamps allow us to restrict
+ the set of sstables we check (CASSANDRA-4116)
+ * add support for commitlog archiving and point-in-time recovery
+ (CASSANDRA-3690)
+ * avoid generating redundant compaction tasks during streaming
+ (CASSANDRA-4174)
+ * add -cf option to nodetool snapshot, and takeColumnFamilySnapshot to
+ StorageService mbean (CASSANDRA-556)
+ * optimize cleanup to drop entire sstables where possible (CASSANDRA-4079)
+ * optimize truncate when autosnapshot is disabled (CASSANDRA-4153)
+ * update caches to use byte[] keys to reduce memory overhead (CASSANDRA-3966)
+ * add column limit to cli (CASSANDRA-3012, 4098)
+ * clean up and optimize DataOutputBuffer, used by CQL compression and
+ CompositeType (CASSANDRA-4072)
+ * optimize commitlog checksumming (CASSANDRA-3610)
+ * identify and blacklist corrupted SSTables from future compactions
+ (CASSANDRA-2261)
+ * Move CfDef and KsDef validation out of thrift (CASSANDRA-4037)
+ * Expose API to repair a user provided range (CASSANDRA-3912)
+ * Add way to force the cassandra-cli to refresh its schema (CASSANDRA-4052)
+ * Avoid having replicate on write tasks stacking up at CL.ONE
(CASSANDRA-2889)
+ * (cql3) Backwards compatibility for composite comparators in non-cql3-aware
+ clients (CASSANDRA-4093)
+ * (cql3) Fix order by for reversed queries (CASSANDRA-4160)
+ * (cql3) Add ReversedType support (CASSANDRA-4004)
+ * (cql3) Add timeuuid type (CASSANDRA-4194)
+ * (cql3) Minor fixes (CASSANDRA-4185)
+ * (cql3) Fix prepared statement in BATCH (CASSANDRA-4202)
+ * (cql3) Reduce the list of reserved keywords (CASSANDRA-4186)
+ * (cql3) Move max/min compaction thresholds to compaction strategy options
+ (CASSANDRA-4187)
+ * Fix exception during move when localhost is the only source
(CASSANDRA-4200)
+ * (cql3) Allow paging through non-ordered partitioner results
(CASSANDRA-3771)
+ * (cql3) Fix drop index (CASSANDRA-4192)
+ * (cql3) Don't return range ghosts anymore (CASSANDRA-3982)
+ * fix re-creating Keyspaces/ColumnFamilies with the same name as dropped
+ ones (CASSANDRA-4219)
+ * fix SecondaryIndex LeveledManifest save upon snapshot (CASSANDRA-4230)
+ * fix missing arrayOffset in FBUtilities.hash (CASSANDRA-4250)
+ * (cql3) Add name of parameters in CqlResultSet (CASSANDRA-4242)
+ * (cql3) Correctly validate order by queries (CASSANDRA-4246)
+ * rename stress to cassandra-stress for saner packaging (CASSANDRA-4256)
+ * Fix exception on colum metadata with non-string comparator (CASSANDRA-4269)
+ * Check for unknown/invalid compression options (CASSANDRA-4266)
+ * (cql3) Adds simple access to column timestamp and ttl (CASSANDRA-4217)
+ * (cql3) Fix range queries with secondary indexes (CASSANDRA-4257)
+ * Better error messages from improper input in cli (CASSANDRA-3865)
+ * Try to stop all compaction upon Keyspace or ColumnFamily drop
(CASSANDRA-4221)
+ * (cql3) Allow keyspace properties to contain hyphens (CASSANDRA-4278)
+ * (cql3) Correctly validate keyspace access in create table (CASSANDRA-4296)
+ * Avoid deadlock in migration stage (CASSANDRA-3882)
+ * Take supercolumn names and deletion info into account in memtable
throughput
+ (CASSANDRA-4264)
+ * Add back backward compatibility for old style replication factor
(CASSANDRA-4294)
+ * Preserve compatibility with pre-1.1 index queries (CASSANDRA_4264)
+Merged from 1.0:
+ * Fix super columns bug where cache is not updated (CASSANDRA-4190)
+ * fix maxTimestamp to include row tombstones (CASSANDRA-4116)
+ * (CLI) properly handle quotes in create/update keyspace commands
(CASSANDRA-4129)
+ * Avoids possible deadlock during bootstrap (CASSANDRA-4159)
+ * fix stress tool that hangs forever on timeout or error (CASSANDRA-4128)
+ * stress tool to return appropriate exit code on failure (CASSANDRA-4188)
+ * fix compaction NPE when out of disk space and assertions disabled
+ (CASSANDRA-3985)
* synchronize LCS getEstimatedTasks to avoid CME (CASSANDRA-4255)
* ensure unique streaming session id's (CASSANDRA-4223)
* kick off background compaction when min/max thresholds change
http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ec0990a/src/java/org/apache/cassandra/config/CFMetaData.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/CFMetaData.java
index 6dd6b64,cf57b0f..c38841a
--- a/src/java/org/apache/cassandra/config/CFMetaData.java
+++ b/src/java/org/apache/cassandra/config/CFMetaData.java
@@@ -311,73 -237,43 +311,73 @@@ public final class CFMetaDat
CFMetaData newCFMD = new CFMetaData(Table.SYSTEM_TABLE, cfName, type,
comparator, subcc, cfId);
return newCFMD.comment(comment)
- .keyCacheSize(0.01)
.readRepairChance(0)
- .gcGraceSeconds(0)
- .mergeShardsChance(0.0)
- .rowCacheSavePeriod(0)
- .keyCacheSavePeriod(0);
+ .dcLocalReadRepairChance(0)
+ .gcGraceSeconds(0);
}
- public static CFMetaData newIndexMetadata(CFMetaData parent,
ColumnDefinition info, AbstractType columnComparator)
+ private static CFMetaData newSchemaMetadata(String cfName, int cfId,
String comment, AbstractType<?> comparator, AbstractType<?> subcc)
{
+ /*
+ * Schema column families needs a gc_grace (since they are replicated
+ * on every node). That gc_grace should be high enough that no node
+ * could be dead for that long a time.
+ */
+ int gcGrace = 120 * 24 * 3600; // 3 months
+ return newSystemMetadata(cfName, cfId, comment, comparator,
subcc).gcGraceSeconds(gcGrace);
+ }
+
+ public static CFMetaData newIndexMetadata(CFMetaData parent,
ColumnDefinition info, AbstractType<?> columnComparator)
+ {
+ // Depends on parent's cache setting, turn on its index CF's cache.
+ // Here, only key cache is enabled, but later (in KeysIndex) row
cache will be turned on depending on cardinality.
+ Caching indexCaching = parent.getCaching() == Caching.ALL ||
parent.getCaching() == Caching.KEYS_ONLY
+ ? Caching.KEYS_ONLY
+ : Caching.NONE;
+
return new CFMetaData(parent.ksName,
parent.indexColumnFamilyName(info), ColumnFamilyType.Standard,
columnComparator, null)
.keyValidator(info.getValidator())
- .keyCacheSize(0.0)
.readRepairChance(0.0)
+ .dcLocalReadRepairChance(0.0)
+ .gcGraceSeconds(0)
-
.minCompactionThreshold(parent.minCompactionThreshold)
-
.maxCompactionThreshold(parent.maxCompactionThreshold);
+ .caching(indexCaching)
+
.compactionStrategyClass(parent.compactionStrategyClass)
+
.compactionStrategyOptions(parent.compactionStrategyOptions)
+ .reloadSecondaryIndexMetadata(parent);
}
- // Create a new CFMD by changing just the cfName
- public static CFMetaData rename(CFMetaData cfm, String newName)
+ public CFMetaData reloadSecondaryIndexMetadata(CFMetaData parent)
{
- gcGraceSeconds(parent.gcGraceSeconds);
- return copyOpts(new CFMetaData(cfm.ksName, newName, cfm.cfType,
cfm.comparator, cfm.subcolumnComparator, cfm.cfId), cfm);
+ minCompactionThreshold(parent.minCompactionThreshold);
+ maxCompactionThreshold(parent.maxCompactionThreshold);
+ compactionStrategyClass(parent.compactionStrategyClass);
+ compactionStrategyOptions(parent.compactionStrategyOptions);
+ compressionParameters(parent.compressionParameters);
+ return this;
+ }
+
+ public CFMetaData clone()
+ {
+ return copyOpts(new CFMetaData(ksName, cfName, cfType, comparator,
subcolumnComparator, cfId), this);
}
- // Create a new CFMD by changing just the ksName
- public static CFMetaData renameTable(CFMetaData cfm, String ksName)
+ // Create a new CFMD by changing just the cfName
+ public static CFMetaData rename(CFMetaData cfm, String newName)
{
- return copyOpts(new CFMetaData(ksName, cfm.cfName, cfm.cfType,
cfm.comparator, cfm.subcolumnComparator, cfm.cfId), cfm);
+ return copyOpts(new CFMetaData(cfm.ksName, newName, cfm.cfType,
cfm.comparator, cfm.subcolumnComparator, cfm.cfId), cfm);
}
- private static CFMetaData copyOpts(CFMetaData newCFMD, CFMetaData oldCFMD)
+ static CFMetaData copyOpts(CFMetaData newCFMD, CFMetaData oldCFMD)
{
+ Map<ByteBuffer, ColumnDefinition> clonedColumns = new
HashMap<ByteBuffer, ColumnDefinition>();
+ for (ColumnDefinition cd : oldCFMD.column_metadata.values())
+ {
+ ColumnDefinition cloned = cd.clone();
+ clonedColumns.put(cloned.name, cloned);
+ }
return newCFMD.comment(oldCFMD.comment)
- .rowCacheSize(oldCFMD.rowCacheSize)
- .keyCacheSize(oldCFMD.keyCacheSize)
.readRepairChance(oldCFMD.readRepairChance)
+
.dcLocalReadRepairChance(oldCFMD.dcLocalReadRepairChance)
.replicateOnWrite(oldCFMD.replicateOnWrite)
.gcGraceSeconds(oldCFMD.gcGraceSeconds)
.defaultValidator(oldCFMD.defaultValidator)