cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/2] git commit: merge from 1.1
Date Tue, 04 Sep 2012 20:13:45 GMT
Updated Branches:
  refs/heads/trunk b2899f088 -> 6b29ab709


merge from 1.1


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

Branch: refs/heads/trunk
Commit: 6b29ab709f03941037bda89171543860027475ba
Parents: b2899f0 5df7b25
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Tue Sep 4 15:13:28 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Sep 4 15:13:28 2012 -0500

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 ++
 .../cassandra/db/commitlog/CommitLogArchiver.java  |    2 +-
 .../cassandra/db/commitlog/CommitLogSegment.java   |   14 +++++++++++---
 3 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6b29ab70/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 88a0172,6125c9c..61aae96
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,55 -1,6 +1,57 @@@
 +1.2-dev
 + * optimize WriteResponse (CASSANDRA-4548)
 + * new metrics (CASSANDRA-4009)
 + * redesign KEYS indexes to avoid read-before-write (CASSANDRA-2897)
 + * debug tracing (CASSANDRA-1123)
 + * parallelize row cache loading (CASSANDRA-4282)
 + * Make compaction, flush JBOD-aware (CASSANDRA-4292)
 + * run local range scans on the read stage (CASSANDRA-3687)
 + * clean up ioexceptions (CASSANDRA-2116)
 + * add disk_failure_policy (CASSANDRA-2118)
 + * Introduce new json format with row level deletion (CASSANDRA-4054)
 + * remove redundant "name" column from schema_keyspaces (CASSANDRA-4433)
 + * improve "nodetool ring" handling of multi-dc clusters (CASSANDRA-3047)
 + * update NTS calculateNaturalEndpoints to be O(N log N) (CASSANDRA-3881)
 + * add UseCondCardMark XX jvm settings on jdk 1.7 (CASSANDRA-4366)
 + * split up rpc timeout by operation type (CASSANDRA-2819)
 + * rewrite key cache save/load to use only sequential i/o (CASSANDRA-3762)
 + * update MS protocol with a version handshake + broadcast address id
 +   (CASSANDRA-4311)
 + * multithreaded hint replay (CASSANDRA-4189)
 + * add inter-node message compression (CASSANDRA-3127)
 + * remove COPP (CASSANDRA-2479)
 + * Track tombstone expiration and compact when tombstone content is
 +   higher than a configurable threshold, default 20% (CASSANDRA-3442, 4234)
 + * update MurmurHash to version 3 (CASSANDRA-2975)
 + * (CLI) track elapsed time for `delete' operation (CASSANDRA-4060)
 + * (CLI) jline version is bumped to 1.0 to properly  support
 +   'delete' key function (CASSANDRA-4132)
 + * Save IndexSummary into new SSTable 'Summary' component (CASSANDRA-2392, 4289)
 + * Add support for range tombstones (CASSANDRA-3708)
 + * Improve MessagingService efficiency (CASSANDRA-3617)
 + * Avoid ID conflicts from concurrent schema changes (CASSANDRA-3794)
 + * Set thrift HSHA server thread limit to unlimited by default (CASSANDRA-4277)
 + * Avoids double serialization of CF id in RowMutation messages
 +   (CASSANDRA-4293)
 + * stream compressed sstables directly with java nio (CASSANDRA-4297)
 + * Support multiple ranges in SliceQueryFilter (CASSANDRA-3885)
 + * Add column metadata to system column families (CASSANDRA-4018)
 + * (cql3) Always use composite types by default (CASSANDRA-4329)
 + * (cql3) Add support for set, map and list (CASSANDRA-3647)
 + * Validate date type correctly (CASSANDRA-4441)
 + * (cql3) Allow definitions with only a PK (CASSANDRA-4361)
 + * (cql3) Add support for row key composites (CASSANDRA-4179)
 + * improve DynamicEndpointSnitch by using reservoir sampling (CASSANDRA-4038)
 + * (cql3) Add support for 2ndary indexes (CASSANDRA-3680)
 + * (cql3) fix defining more than one PK to be invalid (CASSANDRA-4477)
 + * remove schema agreement checking from all external APIs (Thrift, CQL and CQL3) (CASSANDRA-4487)
 + * add Murmur3Partitioner and make it default for new installations (CASSANDRA-3772)
 + * (cql3) update pseudo-map syntax to use map syntax (CASSANDRA-4497)
 +
 +
  1.1.5
+  * use millis + atomicint for commitlog segment creation instead of
+    nanotime, which has issues under some hypervisors (CASSANDRA-4601)
   * fix FD leak in slice queries (CASSANDRA-4571)
   * avoid recursion in leveled compaction (CASSANDRA-4587)
   * increase stack size under Java7 to 180K

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6b29ab70/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
index b109db5,fe66369..c0732db
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogArchiver.java
@@@ -146,7 -148,10 +146,7 @@@ public class CommitLogArchive
              File[] files = new File(dir).listFiles();
              for (File fromFile : files)
              {
-                 File toFile = new File(DatabaseDescriptor.getCommitLogLocation(), new CommitLogDescriptor(System.nanoTime()).fileName());
           
 -                File toFile = new File(DatabaseDescriptor.getCommitLogLocation(),
 -                                       CommitLogSegment.FILENAME_PREFIX +
 -                                       CommitLogSegment.getNextId() +
 -                                       CommitLogSegment.FILENAME_EXTENSION);           
 
++                File toFile = new File(DatabaseDescriptor.getCommitLogLocation(), new CommitLogDescriptor(CommitLogSegment.getNextId()).fileName());
                  String command = restoreCommand.replace("%from", fromFile.getPath());
                  command = command.replace("%to", toFile.getPath());       
                  exec(command);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/6b29ab70/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
index f3822a4,290db7c..ecff23b
--- a/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
+++ b/src/java/org/apache/cassandra/db/commitlog/CommitLogSegment.java
@@@ -18,14 -20,18 +18,15 @@@
  package org.apache.cassandra.db.commitlog;
  
  import java.io.File;
 -import java.io.IOError;
  import java.io.IOException;
  import java.io.RandomAccessFile;
--import java.nio.channels.FileChannel;
  import java.nio.MappedByteBuffer;
++import java.nio.channels.FileChannel;
  import java.util.Collection;
++import java.util.HashMap;
 +import java.util.UUID;
+ import java.util.concurrent.atomic.AtomicInteger;
 -import java.util.regex.Matcher;
 -import java.util.regex.Pattern;
  import java.util.zip.Checksum;
--import java.util.HashMap;
  
  import org.slf4j.Logger;
  import org.slf4j.LoggerFactory;
@@@ -49,6 -54,12 +50,9 @@@ public class CommitLogSegmen
  {
      private static final Logger logger = LoggerFactory.getLogger(CommitLogSegment.class);
  
 -    static final String FILENAME_PREFIX = "CommitLog-";
 -    static final String FILENAME_EXTENSION = ".log";
 -    private static final Pattern COMMIT_LOG_FILE_PATTERN = Pattern.compile(FILENAME_PREFIX
+ "(\\d+)" + FILENAME_EXTENSION);
+     private final static long idBase = System.currentTimeMillis();
+     private final static AtomicInteger nextId = new AtomicInteger(1);
+ 
      // The commit log entry overhead in bytes (int: length + long: head checksum + long:
tail checksum)
      static final int ENTRY_OVERHEAD_SIZE = 4 + 8 + 8;
  
@@@ -82,9 -95,8 +90,9 @@@
       */
      CommitLogSegment(String filePath)
      {
-         id = System.nanoTime();
+         id = getNextId();
 -        logFile = new File(DatabaseDescriptor.getCommitLogLocation(), FILENAME_PREFIX +
id + FILENAME_EXTENSION);
 +        descriptor = new CommitLogDescriptor(id);
 +        logFile = new File(DatabaseDescriptor.getCommitLogLocation(), descriptor.fileName());
          boolean isCreating = true;
  
          try


Mime
View raw message