Merge branch 'cassandra-1.1' into cassandra-1.2

Conflicts:
        CHANGES.txt
        src/java/org/apache/cassandra/db/Directories.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2156fb22
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2156fb22
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2156fb22

Branch: refs/heads/trunk
Commit: 2156fb22e6455a0f7b5da34bbe9b7cca3ab9c037
Parents: b82027c d4744e1
Author: Aleksey Yeschenko <alek...@apache.org>
Authored: Tue Apr 2 21:05:16 2013 +0300
Committer: Aleksey Yeschenko <alek...@apache.org>
Committed: Tue Apr 2 21:05:16 2013 +0300

----------------------------------------------------------------------
 CHANGES.txt                                       |    1 +
 src/java/org/apache/cassandra/db/Directories.java |   10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2156fb22/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 727ede8,d82bb74..273b6e6
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,51 -1,4 +1,52 @@@
 -1.1.11
 +1.2.4
 + * Change default stream throughput from 400 to 200 mbps (CASSANDRA-5036)
 + * Gossiper logs DOWN for symmetry with UP (CASSANDRA-5187)
 + * Fix mixing prepared statements between keyspaces (CASSANDRA-5352)
 + * Fix consistency level during bootstrap - strike 3 (CASSANDRA-5354)
 + * Fix transposed arguments in AlreadyExistsException (CASSANDRA-5362)
 + * Improve asynchronous hint delivery (CASSANDRA-5179)
 + * Fix Guava dependency version (12.0 -> 13.0.1) for Maven (CASSANDRA-5364)
 + * Validate that provided CQL3 collection value are < 64K (CASSANDRA-5355)
 + * Make upgradeSSTable skip current version sstables by default 
(CASSANDRA-5366)
 + * Optimize min/max timestamp collection (CASSANDRA-5373)
 + * Invalid streamId in cql binary protocol when using invalid CL 
(CASSANDRA-5164)
 + * Fix validation for IN where clauses with collections (CASSANDRA-5376)
 + * Copy resultSet on count query to avoid ConcurrentModificationException 
(CASSANDRA-5382)
 + * Correctly typecheck in CQL3 even with ReversedType (CASSANDRA-5386)
 + * Fix streaming compressed files when using encryption (CASSANDRA-5391)
 + * cassandra-all 1.2.0 pom missing netty dependency (CASSANDRA-5392)
 + * Fix writetime/ttl functions on null values (CASSANDRA-5341)
 + * Fix NPE during cql3 select with token() (CASSANDRA-5404)
 +Merged from 1.1:
 + * cli: Quote ks and cf names in schema output when needed (CASSANDRA-5052)
 + * Fix bad default for min/max timestamp in SSTableMetadata (CASSANDRA-5372)
++ * Fix cf name extraction from manifest in Directories.migrateFile() 
(CASSANDRA-5242)
 +
 +
 +1.2.3
 + * add check for sstable overlap within a level on startup (CASSANDRA-5327)
 + * replace ipv6 colons in jmx object names (CASSANDRA-5298, 5328)
 + * Avoid allocating SSTableBoundedScanner during repair when the range does 
 +   not intersect the sstable (CASSANDRA-5249)
 + * Don't lowercase property map keys (this breaks NTS) (CASSANDRA-5292)
 + * Fix composite comparator with super columns (CASSANDRA-5287)
 + * Fix insufficient validation of UPDATE queries against counter cfs
 +   (CASSANDRA-5300)
 + * Fix PropertyFileSnitch default DC/Rack behavior (CASSANDRA-5285)
 + * Handle null values when executing prepared statement (CASSANDRA-5081)
 + * Add netty to pom dependencies (CASSANDRA-5181)
 + * Include type arguments in Thrift CQLPreparedResult (CASSANDRA-5311)
 + * Fix compaction not removing columns when bf_fp_ratio is 1 (CASSANDRA-5182)
 + * cli: Warn about missing CQL3 tables in schema descriptions (CASSANDRA-5309)
 + * Re-enable unknown option in replication/compaction strategies option for
 +   backward compatibility (CASSANDRA-4795)
 + * Add binary protocol support to stress (CASSANDRA-4993)
 + * cqlsh: Fix COPY FROM value quoting and null handling (CASSANDRA-5305)
 + * Fix repair -pr for vnodes (CASSANDRA-5329)
 + * Relax CL for auth queries for non-default users (CASSANDRA-5310)
 + * Fix AssertionError during repair (CASSANDRA-5245)
 + * Don't announce migrations to pre-1.2 nodes (CASSANDRA-5334)
 +Merged from 1.1:
   * Update offline scrub for 1.0 -> 1.1 directory structure (CASSANDRA-5195)
   * add tmp flag to Descriptor hashcode (CASSANDRA-4021)
   * fix logging of "Found table data in data directories" when only system 
tables

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2156fb22/src/java/org/apache/cassandra/db/Directories.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/Directories.java
index c0af0da,7867875..e80e05d
--- a/src/java/org/apache/cassandra/db/Directories.java
+++ b/src/java/org/apache/cassandra/db/Directories.java
@@@ -639,37 -546,28 +639,37 @@@ public class Directorie
  
      private static void migrateFile(File file, File ksDir, String 
additionalPath)
      {
 +        if (file.isDirectory())
 +            return;
 +
          try
          {
 -            if (file.isDirectory())
 -                return;
 -
              String name = file.getName();
              boolean isManifest = name.endsWith(LeveledManifest.EXTENSION);
 -            String cfname = isManifest
 -                          ? getCfNameFromManifest(name)
 -                          : name.substring(0, 
name.indexOf(Component.separator));
 +            int separatorIndex = name.indexOf(Component.separator);
  
 -            int idx = cfname.indexOf(SECONDARY_INDEX_NAME_SEPARATOR); // idx 
> 0 => secondary index
 -            String dirname = idx > 0 ? cfname.substring(0, idx) : cfname;
 -            File destDir = getOrCreate(ksDir, dirname, additionalPath);
 +            if (isManifest || (separatorIndex >= 0))
 +            {
 +                String cfname = isManifest
-                               ? name.substring(0, name.length() - 
LeveledManifest.EXTENSION.length())
++                              ? getCfNameFromManifest(name)
 +                              : name.substring(0, separatorIndex);
 +
 +                int idx = cfname.indexOf(SECONDARY_INDEX_NAME_SEPARATOR); // 
idx > 0 => secondary index
 +                String dirname = idx > 0 ? cfname.substring(0, idx) : cfname;
 +                File destDir = getOrCreate(ksDir, dirname, additionalPath);
  
 -            File destFile = new File(destDir, isManifest ? name : 
ksDir.getName() + Component.separator + name);
 -            logger.debug(String.format("[upgrade to 1.1] Moving %s to %s", 
file, destFile));
 -            FileUtils.renameWithConfirm(file, destFile);
 +                File destFile = new File(destDir, isManifest ? name : 
ksDir.getName() + Component.separator + name);
 +                logger.debug(String.format("[upgrade to 1.1] Moving %s to 
%s", file, destFile));
 +                FileUtils.renameWithConfirm(file, destFile);
 +            }
 +            else
 +            {
 +                logger.warn("Found unrecognized file {} while migrating 
sstables from pre 1.1 format, ignoring.", file);
 +            }
          }
 -        catch (IOException e)
 +        catch (Exception e)
          {
 -            throw new IOError(e);
 +            throw new RuntimeException(String.format("Failed migrating file 
%s from pre 1.1 format.", file.getPath()), e);
          }
      }
  

Reply via email to