You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/08/17 10:53:59 UTC
[1/5] cassandra git commit: Add the removal of 'index_interval' to
the NEWS file
Repository: cassandra
Updated Branches:
refs/heads/cassandra-3.0 c6cbc436b -> d2da7606a
refs/heads/trunk 35b2ec42b -> 85bbbb379
Add the removal of 'index_interval' to the NEWS file
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ec50348d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ec50348d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ec50348d
Branch: refs/heads/trunk
Commit: ec50348d30c4d47921bfa2ec2835524f924fe185
Parents: 29687a8
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon Aug 17 10:41:03 2015 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon Aug 17 10:41:17 2015 +0200
----------------------------------------------------------------------
NEWS.txt | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/ec50348d/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 26fe902..3ba7efa 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -64,6 +64,9 @@ Upgrading
be done by setting the new option `enabled` to `false`.
- Only map syntax is now allowed for caching options. ALL/NONE/KEYS_ONLY/ROWS_ONLY syntax
has been deprecated since 2.1.0 and is being removed in 3.0.0.
+ - The 'index_interval' option for 'CREATE TABLE' statements, which has been deprecated
+ since 2.0 and replaced with the 'min_index_interval' and 'max_index_interval' options,
+ has now been removed.
- Batchlog entries are now stored in a new table - system.batches.
The old one has been deprecated.
- JMX methods set/getCompactionStrategyClass have been removed, use
[4/5] cassandra git commit: fix CommitLogFailurePolicyTest
Posted by be...@apache.org.
fix CommitLogFailurePolicyTest
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d2da7606
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2da7606
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2da7606
Branch: refs/heads/cassandra-3.0
Commit: d2da7606abebd98b11f8b7ec692aa7dcf5388151
Parents: c6cbc43
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Mon Aug 17 09:52:13 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Mon Aug 17 09:53:18 2015 +0100
----------------------------------------------------------------------
.../db/CommitLogFailurePolicyTest.java | 64 ++------------------
1 file changed, 5 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2da7606/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java b/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
index cca6503..0ecab3c 100644
--- a/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
+++ b/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
@@ -19,8 +19,6 @@
package org.apache.cassandra.db;
-import java.io.File;
-
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -28,7 +26,6 @@ import org.apache.cassandra.SchemaLoader;
import org.apache.cassandra.config.Config;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.db.commitlog.CommitLog;
-import org.apache.cassandra.db.commitlog.CommitLogSegmentManager;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.cassandra.gms.Gossiper;
import org.apache.cassandra.service.CassandraDaemon;
@@ -38,7 +35,6 @@ import org.apache.cassandra.utils.KillerForTests;
public class CommitLogFailurePolicyTest
{
-
@BeforeClass
public static void defineSchema() throws ConfigurationException
{
@@ -95,57 +91,20 @@ public class CommitLogFailurePolicyTest
}
@Test
- public void testCommitFailurePolicy_mustDieIfNotStartedUp()
- {
- //startup was not completed successfuly (since method completeSetup() was not called)
- CassandraDaemon daemon = new CassandraDaemon();
- StorageService.instance.registerDaemon(daemon);
-
- KillerForTests killerForTests = new KillerForTests();
- JVMStabilityInspector.Killer originalKiller = JVMStabilityInspector.replaceKiller(killerForTests);
- Config.CommitFailurePolicy oldPolicy = DatabaseDescriptor.getCommitFailurePolicy();
- try
- {
- //even though policy is ignore, JVM must die because Daemon has not finished initializing
- DatabaseDescriptor.setCommitFailurePolicy(Config.CommitFailurePolicy.ignore);
- CommitLog.handleCommitError("Testing die policy", new Throwable());
- Assert.assertTrue(killerForTests.wasKilled());
- Assert.assertTrue(killerForTests.wasKilledQuietly()); //killed quietly due to startup failure
- }
- finally
- {
- DatabaseDescriptor.setCommitFailurePolicy(oldPolicy);
- JVMStabilityInspector.replaceKiller(originalKiller);
- }
- }
-
- @Test
- public void testCommitLogFailureBeforeInitialization_mustKillJVM() throws Exception
+ public void testCommitFailurePolicy_ignore_beforeStartup()
{
//startup was not completed successfuly (since method completeSetup() was not called)
CassandraDaemon daemon = new CassandraDaemon();
StorageService.instance.registerDaemon(daemon);
- //let's make the commit log directory non-writable
- File commitLogDir = new File(DatabaseDescriptor.getCommitLogLocation());
- commitLogDir.setWritable(false);
-
KillerForTests killerForTests = new KillerForTests();
JVMStabilityInspector.Killer originalKiller = JVMStabilityInspector.replaceKiller(killerForTests);
Config.CommitFailurePolicy oldPolicy = DatabaseDescriptor.getCommitFailurePolicy();
try
{
DatabaseDescriptor.setCommitFailurePolicy(Config.CommitFailurePolicy.ignore);
-
- //now let's create a commit log segment manager and wait for it to fail
- new CommitLogSegmentManager(CommitLog.instance);
-
- //busy wait since commitlogsegmentmanager spawns another thread
- int retries = 0;
- while (!killerForTests.wasKilled() && retries++ < 5)
- Thread.sleep(10);
-
- //since failure was before CassandraDaemon startup, the JVM must be killed
+ CommitLog.handleCommitError("Testing ignore policy", new Throwable());
+ //even though policy is ignore, JVM must die because Daemon has not finished initializing
Assert.assertTrue(killerForTests.wasKilled());
Assert.assertTrue(killerForTests.wasKilledQuietly()); //killed quietly due to startup failure
}
@@ -153,35 +112,23 @@ public class CommitLogFailurePolicyTest
{
DatabaseDescriptor.setCommitFailurePolicy(oldPolicy);
JVMStabilityInspector.replaceKiller(originalKiller);
- commitLogDir.setWritable(true);
}
}
@Test
- public void testCommitLogFailureAfterInitialization_mustRespectFailurePolicy() throws Exception
+ public void testCommitFailurePolicy_ignore_afterStartup() throws Exception
{
- //startup was not completed successfuly (since method completeSetup() was not called)
CassandraDaemon daemon = new CassandraDaemon();
daemon.completeSetup(); //startup must be completed, otherwise commit log failure must kill JVM regardless of failure policy
StorageService.instance.registerDaemon(daemon);
- //let's make the commit log directory non-writable
- File commitLogDir = new File(DatabaseDescriptor.getCommitLogLocation());
- commitLogDir.setWritable(false);
-
KillerForTests killerForTests = new KillerForTests();
JVMStabilityInspector.Killer originalKiller = JVMStabilityInspector.replaceKiller(killerForTests);
Config.CommitFailurePolicy oldPolicy = DatabaseDescriptor.getCommitFailurePolicy();
try
{
DatabaseDescriptor.setCommitFailurePolicy(Config.CommitFailurePolicy.ignore);
-
- //now let's create a commit log segment manager and wait for it to fail
- new CommitLogSegmentManager(CommitLog.instance);
-
- //wait commit log segment manager thread to execute
- Thread.sleep(50);
-
+ CommitLog.handleCommitError("Testing ignore policy", new Throwable());
//error policy is set to IGNORE, so JVM must not be killed if error ocurs after startup
Assert.assertFalse(killerForTests.wasKilled());
}
@@ -189,7 +136,6 @@ public class CommitLogFailurePolicyTest
{
DatabaseDescriptor.setCommitFailurePolicy(oldPolicy);
JVMStabilityInspector.replaceKiller(originalKiller);
- commitLogDir.setWritable(true);
}
}
}
[3/5] cassandra git commit: fix CommitLogFailurePolicyTest
Posted by be...@apache.org.
fix CommitLogFailurePolicyTest
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d2da7606
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d2da7606
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d2da7606
Branch: refs/heads/trunk
Commit: d2da7606abebd98b11f8b7ec692aa7dcf5388151
Parents: c6cbc43
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Mon Aug 17 09:52:13 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Mon Aug 17 09:53:18 2015 +0100
----------------------------------------------------------------------
.../db/CommitLogFailurePolicyTest.java | 64 ++------------------
1 file changed, 5 insertions(+), 59 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/d2da7606/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java b/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
index cca6503..0ecab3c 100644
--- a/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
+++ b/test/unit/org/apache/cassandra/db/CommitLogFailurePolicyTest.java
@@ -19,8 +19,6 @@
package org.apache.cassandra.db;
-import java.io.File;
-
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -28,7 +26,6 @@ import org.apache.cassandra.SchemaLoader;
import org.apache.cassandra.config.Config;
import org.apache.cassandra.config.DatabaseDescriptor;
import org.apache.cassandra.db.commitlog.CommitLog;
-import org.apache.cassandra.db.commitlog.CommitLogSegmentManager;
import org.apache.cassandra.exceptions.ConfigurationException;
import org.apache.cassandra.gms.Gossiper;
import org.apache.cassandra.service.CassandraDaemon;
@@ -38,7 +35,6 @@ import org.apache.cassandra.utils.KillerForTests;
public class CommitLogFailurePolicyTest
{
-
@BeforeClass
public static void defineSchema() throws ConfigurationException
{
@@ -95,57 +91,20 @@ public class CommitLogFailurePolicyTest
}
@Test
- public void testCommitFailurePolicy_mustDieIfNotStartedUp()
- {
- //startup was not completed successfuly (since method completeSetup() was not called)
- CassandraDaemon daemon = new CassandraDaemon();
- StorageService.instance.registerDaemon(daemon);
-
- KillerForTests killerForTests = new KillerForTests();
- JVMStabilityInspector.Killer originalKiller = JVMStabilityInspector.replaceKiller(killerForTests);
- Config.CommitFailurePolicy oldPolicy = DatabaseDescriptor.getCommitFailurePolicy();
- try
- {
- //even though policy is ignore, JVM must die because Daemon has not finished initializing
- DatabaseDescriptor.setCommitFailurePolicy(Config.CommitFailurePolicy.ignore);
- CommitLog.handleCommitError("Testing die policy", new Throwable());
- Assert.assertTrue(killerForTests.wasKilled());
- Assert.assertTrue(killerForTests.wasKilledQuietly()); //killed quietly due to startup failure
- }
- finally
- {
- DatabaseDescriptor.setCommitFailurePolicy(oldPolicy);
- JVMStabilityInspector.replaceKiller(originalKiller);
- }
- }
-
- @Test
- public void testCommitLogFailureBeforeInitialization_mustKillJVM() throws Exception
+ public void testCommitFailurePolicy_ignore_beforeStartup()
{
//startup was not completed successfuly (since method completeSetup() was not called)
CassandraDaemon daemon = new CassandraDaemon();
StorageService.instance.registerDaemon(daemon);
- //let's make the commit log directory non-writable
- File commitLogDir = new File(DatabaseDescriptor.getCommitLogLocation());
- commitLogDir.setWritable(false);
-
KillerForTests killerForTests = new KillerForTests();
JVMStabilityInspector.Killer originalKiller = JVMStabilityInspector.replaceKiller(killerForTests);
Config.CommitFailurePolicy oldPolicy = DatabaseDescriptor.getCommitFailurePolicy();
try
{
DatabaseDescriptor.setCommitFailurePolicy(Config.CommitFailurePolicy.ignore);
-
- //now let's create a commit log segment manager and wait for it to fail
- new CommitLogSegmentManager(CommitLog.instance);
-
- //busy wait since commitlogsegmentmanager spawns another thread
- int retries = 0;
- while (!killerForTests.wasKilled() && retries++ < 5)
- Thread.sleep(10);
-
- //since failure was before CassandraDaemon startup, the JVM must be killed
+ CommitLog.handleCommitError("Testing ignore policy", new Throwable());
+ //even though policy is ignore, JVM must die because Daemon has not finished initializing
Assert.assertTrue(killerForTests.wasKilled());
Assert.assertTrue(killerForTests.wasKilledQuietly()); //killed quietly due to startup failure
}
@@ -153,35 +112,23 @@ public class CommitLogFailurePolicyTest
{
DatabaseDescriptor.setCommitFailurePolicy(oldPolicy);
JVMStabilityInspector.replaceKiller(originalKiller);
- commitLogDir.setWritable(true);
}
}
@Test
- public void testCommitLogFailureAfterInitialization_mustRespectFailurePolicy() throws Exception
+ public void testCommitFailurePolicy_ignore_afterStartup() throws Exception
{
- //startup was not completed successfuly (since method completeSetup() was not called)
CassandraDaemon daemon = new CassandraDaemon();
daemon.completeSetup(); //startup must be completed, otherwise commit log failure must kill JVM regardless of failure policy
StorageService.instance.registerDaemon(daemon);
- //let's make the commit log directory non-writable
- File commitLogDir = new File(DatabaseDescriptor.getCommitLogLocation());
- commitLogDir.setWritable(false);
-
KillerForTests killerForTests = new KillerForTests();
JVMStabilityInspector.Killer originalKiller = JVMStabilityInspector.replaceKiller(killerForTests);
Config.CommitFailurePolicy oldPolicy = DatabaseDescriptor.getCommitFailurePolicy();
try
{
DatabaseDescriptor.setCommitFailurePolicy(Config.CommitFailurePolicy.ignore);
-
- //now let's create a commit log segment manager and wait for it to fail
- new CommitLogSegmentManager(CommitLog.instance);
-
- //wait commit log segment manager thread to execute
- Thread.sleep(50);
-
+ CommitLog.handleCommitError("Testing ignore policy", new Throwable());
//error policy is set to IGNORE, so JVM must not be killed if error ocurs after startup
Assert.assertFalse(killerForTests.wasKilled());
}
@@ -189,7 +136,6 @@ public class CommitLogFailurePolicyTest
{
DatabaseDescriptor.setCommitFailurePolicy(oldPolicy);
JVMStabilityInspector.replaceKiller(originalKiller);
- commitLogDir.setWritable(true);
}
}
}
[2/5] cassandra git commit: Fix typo in NEWS message
Posted by be...@apache.org.
Fix typo in NEWS message
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c6cbc436
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c6cbc436
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c6cbc436
Branch: refs/heads/trunk
Commit: c6cbc436b2d94eab21c00f5dbb74f0d8a3dcb46b
Parents: ec50348
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Mon Aug 17 10:42:26 2015 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Mon Aug 17 10:42:26 2015 +0200
----------------------------------------------------------------------
NEWS.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/c6cbc436/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 3ba7efa..ef764ad 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -65,7 +65,7 @@ Upgrading
- Only map syntax is now allowed for caching options. ALL/NONE/KEYS_ONLY/ROWS_ONLY syntax
has been deprecated since 2.1.0 and is being removed in 3.0.0.
- The 'index_interval' option for 'CREATE TABLE' statements, which has been deprecated
- since 2.0 and replaced with the 'min_index_interval' and 'max_index_interval' options,
+ since 2.1 and replaced with the 'min_index_interval' and 'max_index_interval' options,
has now been removed.
- Batchlog entries are now stored in a new table - system.batches.
The old one has been deprecated.
[5/5] cassandra git commit: Merge branch 'cassandra-3.0' into trunk
Posted by be...@apache.org.
Merge branch 'cassandra-3.0' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/85bbbb37
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/85bbbb37
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/85bbbb37
Branch: refs/heads/trunk
Commit: 85bbbb37932d5ea0e3c41a562f848e6ce84526cb
Parents: 35b2ec4 d2da760
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Mon Aug 17 09:53:26 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Mon Aug 17 09:53:26 2015 +0100
----------------------------------------------------------------------
NEWS.txt | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------