cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [7/8] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Date Tue, 01 Apr 2014 01:26:28 GMT
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
	src/java/org/apache/cassandra/db/BatchlogManager.java


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

Branch: refs/heads/trunk
Commit: e5639f44c3e5a345026219eb4e5a242aafa957c3
Parents: 2bb30af 0fce7ac
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Tue Apr 1 04:25:40 2014 +0300
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Tue Apr 1 04:25:40 2014 +0300

----------------------------------------------------------------------
 CHANGES.txt                                                | 2 ++
 src/java/org/apache/cassandra/db/BatchlogManager.java      | 2 +-
 test/unit/org/apache/cassandra/db/BatchlogManagerTest.java | 3 +++
 3 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5639f44/CHANGES.txt
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5639f44/src/java/org/apache/cassandra/db/BatchlogManager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/BatchlogManager.java
index 47eb77a,b5e8297..75f744c
--- a/src/java/org/apache/cassandra/db/BatchlogManager.java
+++ b/src/java/org/apache/cassandra/db/BatchlogManager.java
@@@ -235,8 -242,8 +235,8 @@@ public class BatchlogManager implement
  
      private void deleteBatch(UUID id)
      {
 -        RowMutation mutation = new RowMutation(Keyspace.SYSTEM_KS, UUIDType.instance.decompose(id));
 +        Mutation mutation = new Mutation(Keyspace.SYSTEM_KS, UUIDType.instance.decompose(id));
-         mutation.delete(SystemKeyspace.BATCHLOG_CF, System.currentTimeMillis());
+         mutation.delete(SystemKeyspace.BATCHLOG_CF, FBUtilities.timestampMicros());
          mutation.apply();
      }
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e5639f44/test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
index 42cd196,537278a..43f96fb
--- a/test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
+++ b/test/unit/org/apache/cassandra/db/BatchlogManagerTest.java
@@@ -67,13 -64,12 +67,16 @@@ public class BatchlogManagerTest extend
              long timestamp = System.currentTimeMillis();
              if (i < 500)
                  timestamp -= DatabaseDescriptor.getWriteRpcTimeout() * 2;
 -            BatchlogManager.getBatchlogMutationFor(Collections.singleton(mutation), UUIDGen.getTimeUUID(),
timestamp * 1000).apply();
 +            BatchlogManager.getBatchlogMutationFor(Collections.singleton(mutation),
 +                                                   UUIDGen.getTimeUUID(),
 +                                                   MessagingService.current_version,
 +                                                   timestamp * 1000)
 +                           .apply();
          }
  
+         // Flush the batchlog to disk (see CASSANDRA-6822).
+         Keyspace.open(Keyspace.SYSTEM_KS).getColumnFamilyStore(SystemKeyspace.BATCHLOG_CF).forceBlockingFlush();
+ 
          assertEquals(1000, BatchlogManager.instance.countAllBatches());
          assertEquals(0, BatchlogManager.instance.getTotalBatchesReplayed());
  


Mime
View raw message