Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/feb30e21 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/feb30e21 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/feb30e21 Branch: refs/heads/trunk Commit: feb30e21c0d3f97cef4b87d66dc28bcbe51d29df Parents: 5f37e9f e25d94e Author: Aleksey Yeschenko <[email protected]> Authored: Tue Sep 16 00:36:25 2014 -0700 Committer: Aleksey Yeschenko <[email protected]> Committed: Tue Sep 16 00:38:21 2014 -0700 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../apache/cassandra/cache/AutoSavingCache.java | 38 +++++++++++--------- .../org/apache/cassandra/cache/CacheKey.java | 38 ++------------------ .../apache/cassandra/cache/CounterCacheKey.java | 6 ++-- .../org/apache/cassandra/cache/KeyCacheKey.java | 4 +-- .../org/apache/cassandra/cache/RowCacheKey.java | 7 ++-- .../cassandra/config/DatabaseDescriptor.java | 9 +---- .../org/apache/cassandra/config/Schema.java | 9 +++++ 8 files changed, 40 insertions(+), 72 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/feb30e21/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index ed141ef,f89cc6d..2db88fb --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,27 -1,5 +1,28 @@@ +3.0 + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Support Java source code for user-defined functions (CASSANDRA-7562) + * Require arg types to disambiguate UDF drops (CASSANDRA-7812) + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) http://git-wip-us.apache.org/repos/asf/cassandra/blob/feb30e21/src/java/org/apache/cassandra/cache/AutoSavingCache.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/cache/AutoSavingCache.java index affd69b,d8fd5e0..5c39938 --- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java +++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java @@@ -64,9 -65,16 +65,10 @@@ public class AutoSavingCache<K extends this.cacheLoader = cacheloader; } - public File getCachePath(String ksName, String cfName, UUID cfId, String version) - @Deprecated - public File getCachePath(String ksName, String cfName, UUID cfId, String version) - { - return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); - } - + public File getCachePath(UUID cfId, String version) { - return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); + Pair<String, String> names = Schema.instance.getCF(cfId); + return DatabaseDescriptor.getSerializedCachePath(names.left, names.right, cfId, cacheType, version); } public Writer getWriter(int keysToSave) @@@ -103,10 -111,10 +105,7 @@@ long start = System.nanoTime(); // modern format, allows both key and value (so key cache load can be purely sequential) - File path = getCachePath(cfs.keyspace.getName(), cfs.name, cfs.metadata.cfId, CURRENT_VERSION); - // if path does not exist, try without cfId (assuming saved cache is created with current CF) - if (!path.exists()) - path = getCachePath(cfs.keyspace.getName(), cfs.name, null, CURRENT_VERSION); + File path = getCachePath(cfs.metadata.cfId, CURRENT_VERSION); - // if path does not exist, try without cfId (assuming saved cache is created with current CF) - if (!path.exists()) - path = getCachePath(cfs.keyspace.getName(), cfs.name, null, CURRENT_VERSION); if (path.exists()) { DataInputStream in = null; http://git-wip-us.apache.org/repos/asf/cassandra/blob/feb30e21/src/java/org/apache/cassandra/config/DatabaseDescriptor.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java index f542ced,e8c5372..6899375 --- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java +++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java @@@ -1330,19 -1319,19 +1330,12 @@@ public class DatabaseDescripto return conf.max_hint_window_in_ms; } -- @Deprecated -- public static Integer getIndexInterval() -- { -- return conf.index_interval; -- } -- public static File getSerializedCachePath(String ksName, String cfName, UUID cfId, CacheService.CacheType cacheType, String version) { StringBuilder builder = new StringBuilder(); builder.append(ksName).append('-'); builder.append(cfName).append('-'); -- if (cfId != null) -- builder.append(ByteBufferUtil.bytesToHex(ByteBufferUtil.bytes(cfId))).append('-'); ++ builder.append(ByteBufferUtil.bytesToHex(ByteBufferUtil.bytes(cfId))).append('-'); builder.append(cacheType); builder.append((version == null ? "" : "-" + version + ".db")); return new File(conf.saved_caches_directory, builder.toString()); http://git-wip-us.apache.org/repos/asf/cassandra/blob/feb30e21/src/java/org/apache/cassandra/config/Schema.java ----------------------------------------------------------------------
