cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [2/7] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2
Date Mon, 25 Mar 2013 19:21:23 GMT
Merge branch 'cassandra-1.1' into cassandra-1.2

Conflicts:
	CHANGES.txt
	src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java


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

Branch: refs/heads/trunk
Commit: 737ef771032c8487947d41bdd3dcaba8987e682f
Parents: 25f5afa b4d26bb
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Mar 25 15:33:08 2013 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Mon Mar 25 15:33:08 2013 +0100

----------------------------------------------------------------------
 CHANGES.txt                                        |    1 +
 .../apache/cassandra/db/CollationController.java   |    3 +-
 .../cassandra/io/sstable/SSTableMetadata.java      |   22 +++++++-------
 .../apache/cassandra/io/sstable/SSTableReader.java |    4 +--
 4 files changed, 14 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/737ef771/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 7bf455c,0580d15..22cbe3a
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,42 -1,4 +1,43 @@@
 -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)
 + * Change Kernel Page Cache skipping into row preheating (disabled by default)
 +   (CASSANDRA-4937)
 +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)
 +
 +
 +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/737ef771/src/java/org/apache/cassandra/db/CollationController.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/CollationController.java
index 3350de3,fb9674f..dafcdd3
--- a/src/java/org/apache/cassandra/db/CollationController.java
+++ b/src/java/org/apache/cassandra/db/CollationController.java
@@@ -212,8 -205,8 +212,7 @@@ public class CollationControlle
          AbstractColumnContainer container = filter.path.superColumnName == null
                                            ? returnCF
                                            : (SuperColumn) returnCF.getColumn(filter.path.superColumnName);
--        // MIN_VALUE means we don't know any information
--        if (container == null || sstableTimestamp == Long.MIN_VALUE)
++        if (container == null)
              return;
  
          for (Iterator<ByteBuffer> iterator = ((NamesQueryFilter) filter.filter).columns.iterator();
iterator.hasNext(); )

http://git-wip-us.apache.org/repos/asf/cassandra/blob/737ef771/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
index bb4ded4,64555a0..865c2ea
--- a/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableMetadata.java
@@@ -63,16 -62,13 +63,23 @@@ public class SSTableMetadat
          this(defaultRowSizeHistogram(),
               defaultColumnCountHistogram(),
               ReplayPosition.NONE,
-              Long.MAX_VALUE,
 +             Long.MIN_VALUE,
+              Long.MAX_VALUE,
 -             Double.MIN_VALUE,
 +             NO_COMPRESSION_RATIO,
               null,
 -             Collections.<Integer>emptySet());
 +             Collections.<Integer>emptySet(),
 +             defaultTombstoneDropTimeHistogram());
      }
  
-     private SSTableMetadata(EstimatedHistogram rowSizes, EstimatedHistogram columnCounts,
ReplayPosition replayPosition, long minTimestamp,
-             long maxTimestamp, double cr, String partitioner, Set<Integer> ancestors,
StreamingHistogram estimatedTombstoneDropTime)
 -    private SSTableMetadata(EstimatedHistogram rowSizes, EstimatedHistogram columnCounts,
ReplayPosition replayPosition, long maxTimestamp, double cr, String partitioner, Set<Integer>
ancestors)
++    private SSTableMetadata(EstimatedHistogram rowSizes,
++                            EstimatedHistogram columnCounts,
++                            ReplayPosition replayPosition,
++                            long minTimestamp,
++                            long maxTimestamp,
++                            double cr,
++                            String partitioner,
++                            Set<Integer> ancestors,
++                            StreamingHistogram estimatedTombstoneDropTime)
      {
          this.estimatedRowSize = rowSizes;
          this.estimatedColumnCount = columnCounts;
@@@ -82,14 -77,13 +89,9 @@@
          this.compressionRatio = cr;
          this.partitioner = partitioner;
          this.ancestors = ancestors;
 -    }
 -
 -    public static SSTableMetadata createDefaultInstance()
 -    {
 -        return new SSTableMetadata();
 +        this.estimatedTombstoneDropTime = estimatedTombstoneDropTime;
      }
  
-     public static SSTableMetadata createDefaultInstance()
-     {
-         return new SSTableMetadata();
-     }
- 
      public static Collector createCollector()
      {
          return new Collector();
@@@ -291,17 -223,14 +293,15 @@@
                  // make sure we don't omit replaying something that we should.  see CASSANDRA-4782
                  replayPosition = ReplayPosition.NONE;
              }
 -            long maxTimestamp = desc.containsTimestamp() ? dis.readLong() : Long.MAX_VALUE;
 -            if (!desc.tracksMaxTimestamp) // see javadoc to Descriptor.containsTimestamp
 +            long minTimestamp = desc.version.tracksMinTimestamp ? dis.readLong() : Long.MIN_VALUE;
-             if (!desc.version.tracksMinTimestamp)
-                 minTimestamp = Long.MAX_VALUE;
-             long maxTimestamp = desc.version.containsTimestamp() ? dis.readLong() : Long.MIN_VALUE;
++            long maxTimestamp = desc.version.containsTimestamp() ? dis.readLong() : Long.MAX_VALUE;
 +            if (!desc.version.tracksMaxTimestamp) // see javadoc to Descriptor.containsTimestamp
                  maxTimestamp = Long.MAX_VALUE;
 -            double compressionRatio = desc.hasCompressionRatio
 +            double compressionRatio = desc.version.hasCompressionRatio
                                      ? dis.readDouble()
 -                                    : Double.MIN_VALUE;
 -            String partitioner = desc.hasPartitioner ? dis.readUTF() : null;
 -            int nbAncestors = desc.hasAncestors ? dis.readInt() : 0;
 +                                    : NO_COMPRESSION_RATIO;
 +            String partitioner = desc.version.hasPartitioner ? dis.readUTF() : null;
 +            int nbAncestors = desc.version.hasAncestors ? dis.readInt() : 0;
              Set<Integer> ancestors = new HashSet<Integer>(nbAncestors);
              for (int i = 0; i < nbAncestors; i++)
                  ancestors.add(dis.readInt());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/737ef771/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/io/sstable/SSTableReader.java
index dbc45d8,18d77ee..cec2e42
--- a/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
+++ b/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
@@@ -165,9 -168,9 +165,7 @@@ public class SSTableReader extends SSTa
          long start = System.currentTimeMillis();
          logger.info("Opening {} ({} bytes)", descriptor, new File(descriptor.filenameFor(COMPONENT_DATA)).length());
  
--        SSTableMetadata sstableMetadata = components.contains(Component.STATS)
--                                        ? SSTableMetadata.serializer.deserialize(descriptor)
--                                        : SSTableMetadata.createDefaultInstance();
++        SSTableMetadata sstableMetadata = SSTableMetadata.serializer.deserialize(descriptor);
  
          // Check if sstable is created using same partitioner.
          // Partitioner can be null, which indicates older version of sstable or no stats
available.


Mime
View raw message