You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2014/06/27 04:37:10 UTC
[1/8] git commit: Fix race in FileCacheService RemovalListener patch
by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7278
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.0 900f29c7f -> 2b973b9ed
refs/heads/cassandra-2.1 c18e740c8 -> 8aa2b791d
refs/heads/trunk 652a7ea71 -> beea5d68c
Fix race in FileCacheService RemovalListener
patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7278
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/900f29c7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/900f29c7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/900f29c7
Branch: refs/heads/trunk
Commit: 900f29c7f7e1d563c4b0c63eae0da8877766813f
Parents: ac1d5bd
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 19:16:12 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 19:17:58 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 4 ++++
src/java/org/apache/cassandra/service/FileCacheService.java | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/900f29c7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2b3ace3..c74b27d 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,3 +1,7 @@
+2.0.10
+ * Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+
+
2.0.9
* Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
* Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/900f29c7/src/java/org/apache/cassandra/service/FileCacheService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/FileCacheService.java b/src/java/org/apache/cassandra/service/FileCacheService.java
index faa53f0..59b5548 100644
--- a/src/java/org/apache/cassandra/service/FileCacheService.java
+++ b/src/java/org/apache/cassandra/service/FileCacheService.java
@@ -69,7 +69,7 @@ public class FileCacheService
if (cachedInstances.size() > 0)
logger.debug("Evicting cold readers for {}", cachedInstances.peek().getPath());
- for (RandomAccessReader reader : cachedInstances)
+ for (RandomAccessReader reader = cachedInstances.poll(); reader != null; reader = cachedInstances.poll())
{
memoryUsage.addAndGet(-1 * reader.getTotalBufferSize());
reader.deallocate();
[2/8] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Posted by jb...@apache.org.
Merge branch 'cassandra-2.0' into cassandra-2.1
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c18e740c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c18e740c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c18e740c
Branch: refs/heads/trunk
Commit: c18e740c8d26798c70cc1145f9ddea6ac505d7b1
Parents: e8500c7 900f29c
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 19:18:52 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 19:18:52 2014 -0500
----------------------------------------------------------------------
----------------------------------------------------------------------
[7/8] git commit: merge from 2.0
Posted by jb...@apache.org.
merge from 2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8aa2b791
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8aa2b791
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8aa2b791
Branch: refs/heads/cassandra-2.1
Commit: 8aa2b791d946f6308b6e672293b2c1e0f92f546a
Parents: c18e740 2b973b9
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 21:36:55 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 21:36:55 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 3 +++
src/java/org/apache/cassandra/service/StorageProxy.java | 11 ++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa2b791/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 971a33e,365722f..95921ff
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,29 +1,41 @@@
-2.0.10
+2.1.0
+Merged from 2.0:
+ * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
+ * Support DISTINCT for static columns and fix behaviour when DISTINC is
+ not use (CASSANDRA-7305).
+ * Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+ * Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM
+ operations to incorrect become full QUORUM (CASSANDRA-7345)
-2.0.9
- * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
- * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
- * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
+2.1.0-rc2
+ * Fix heap size calculation for CompoundSparseCellName and
+ CompoundSparseCellName.WithCollection (CASSANDRA-7421)
+ * Allow counter mutations in UNLOGGED batches (CASSANDRA-7351)
+ * Modify reconcile logic to always pick a tombstone over a counter cell
+ (CASSANDRA-7346)
+ * Avoid incremental compaction on Windows (CASSANDRA-7365)
+ * Fix exception when querying a composite-keyed table with a collection index
+ (CASSANDRA-7372)
+ * Use node's host id in place of counter ids (CASSANDRA-7366)
* Fix native protocol CAS batches (CASSANDRA-7337)
+ * Reduce likelihood of contention on local paxos locking (CASSANDRA-7359)
+ * Upgrade to Pig 0.12.1 (CASSANDRA-6556)
+ * Make sure we clear out repair sessions from netstats (CASSANDRA-7329)
+ * Don't fail streams on failure detector downs (CASSANDRA-3569)
+ * Add optional keyspace to DROP INDEX statement (CASSANDRA-7314)
+ * Reduce run time for CQL tests (CASSANDRA-7327)
+ * Fix heap size calculation on Windows (CASSANDRA-7352, 7353)
+ * RefCount native frames from netty (CASSANDRA-7245)
+ * Use tarball dir instead of /var for default paths (CASSANDRA-7136)
+ * Remove rows_per_partition_to_cache keyword (CASSANDRA-7193)
+ * Fix schema change response in native protocol v3 (CASSANDRA-7413)
+Merged from 2.0:
+ * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
* Add per-CF range read request latency metrics (CASSANDRA-7338)
* Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
- * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
- * Swap local and global default read repair chances (CASSANDRA-7320)
- * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
- * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
- * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
- * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
- * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
- * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
- * Add authentication support to shuffle (CASSANDRA-6484)
- * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
* Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
* Fix infinite loop on exception while streaming (CASSANDRA-7330)
- * Reference sstables before populating key cache (CASSANDRA-7234)
* Account for range tombstones in min/max column names (CASSANDRA-7235)
* Improve sub range repair validation (CASSANDRA-7317)
* Accept subtypes for function results, type casts (CASSANDRA-6766)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa2b791/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
[5/8] git commit: Fix inconsistent use of consistencyForCommit that
allowed LOCAL_QUORUM operations to incorrect become full QUORUM patch by
Sankalp Kohli; reviewed by jbellis for CASSANDRA-7345
Posted by jb...@apache.org.
Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM operations to incorrect become full QUORUM
patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7345
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2b973b9e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2b973b9e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2b973b9e
Branch: refs/heads/cassandra-2.1
Commit: 2b973b9ed1c1c6bd1c5b0c756cae12db434f02c0
Parents: 900f29c
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 21:35:50 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 21:35:50 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 ++
src/java/org/apache/cassandra/service/StorageProxy.java | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b973b9e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c74b27d..365722f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
2.0.10
* Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+ * Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM
+ operations to incorrect become full QUORUM (CASSANDRA-7345)
2.0.9
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b973b9e/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 3b10cff..c606d75 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -217,7 +217,7 @@ public class StorageProxy implements StorageProxyMBean
List<InetAddress> liveEndpoints = p.left;
int requiredParticipants = p.right;
- UUID ballot = beginAndRepairPaxos(start, key, metadata, liveEndpoints, requiredParticipants, consistencyForPaxos);
+ UUID ballot = beginAndRepairPaxos(start, key, metadata, liveEndpoints, requiredParticipants, consistencyForPaxos, consistencyForCommit);
// read the current values and check they validate the conditions
Tracing.trace("Reading existing values for CAS precondition");
@@ -302,7 +302,7 @@ public class StorageProxy implements StorageProxyMBean
* @return the Paxos ballot promised by the replicas if no in-progress requests were seen and a quorum of
* nodes have seen the mostRecentCommit. Otherwise, return null.
*/
- private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List<InetAddress> liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos)
+ private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List<InetAddress> liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit)
throws WriteTimeoutException
{
long timeout = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getCasContentionTimeout());
@@ -338,7 +338,7 @@ public class StorageProxy implements StorageProxyMBean
Commit refreshedInProgress = Commit.newProposal(inProgress.key, ballot, inProgress.update);
if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false, consistencyForPaxos))
{
- commitPaxos(refreshedInProgress, ConsistencyLevel.QUORUM);
+ commitPaxos(refreshedInProgress, consistencyForCommit);
}
else
{
@@ -1140,16 +1140,17 @@ public class StorageProxy implements StorageProxyMBean
int requiredParticipants = p.right;
// does the work of applying in-progress writes; throws UAE or timeout if it can't
+ final ConsistencyLevel consistencyForCommitOrFetch = consistency_level == ConsistencyLevel.LOCAL_SERIAL ? ConsistencyLevel.LOCAL_QUORUM : ConsistencyLevel.QUORUM;
try
{
- beginAndRepairPaxos(start, command.key, metadata, liveEndpoints, requiredParticipants, consistency_level);
+ beginAndRepairPaxos(start, command.key, metadata, liveEndpoints, requiredParticipants, consistency_level, consistencyForCommitOrFetch);
}
catch (WriteTimeoutException e)
{
throw new ReadTimeoutException(consistency_level, 0, consistency_level.blockFor(Keyspace.open(command.ksName)), false);
}
- rows = fetchRows(commands, consistency_level == ConsistencyLevel.LOCAL_SERIAL ? ConsistencyLevel.LOCAL_QUORUM : ConsistencyLevel.QUORUM);
+ rows = fetchRows(commands, consistencyForCommitOrFetch);
}
else
{
[6/8] git commit: merge from 2.0
Posted by jb...@apache.org.
merge from 2.0
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8aa2b791
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8aa2b791
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8aa2b791
Branch: refs/heads/trunk
Commit: 8aa2b791d946f6308b6e672293b2c1e0f92f546a
Parents: c18e740 2b973b9
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 21:36:55 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 21:36:55 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 3 +++
src/java/org/apache/cassandra/service/StorageProxy.java | 11 ++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa2b791/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 971a33e,365722f..95921ff
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,29 +1,41 @@@
-2.0.10
+2.1.0
+Merged from 2.0:
+ * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
+ * Support DISTINCT for static columns and fix behaviour when DISTINC is
+ not use (CASSANDRA-7305).
+ * Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+ * Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM
+ operations to incorrect become full QUORUM (CASSANDRA-7345)
-2.0.9
- * Fix CC#collectTimeOrderedData() tombstone optimisations (CASSANDRA-7394)
- * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
- * Handle empty CFs in Memtable#maybeUpdateLiveRatio() (CASSANDRA-7401)
+2.1.0-rc2
+ * Fix heap size calculation for CompoundSparseCellName and
+ CompoundSparseCellName.WithCollection (CASSANDRA-7421)
+ * Allow counter mutations in UNLOGGED batches (CASSANDRA-7351)
+ * Modify reconcile logic to always pick a tombstone over a counter cell
+ (CASSANDRA-7346)
+ * Avoid incremental compaction on Windows (CASSANDRA-7365)
+ * Fix exception when querying a composite-keyed table with a collection index
+ (CASSANDRA-7372)
+ * Use node's host id in place of counter ids (CASSANDRA-7366)
* Fix native protocol CAS batches (CASSANDRA-7337)
+ * Reduce likelihood of contention on local paxos locking (CASSANDRA-7359)
+ * Upgrade to Pig 0.12.1 (CASSANDRA-6556)
+ * Make sure we clear out repair sessions from netstats (CASSANDRA-7329)
+ * Don't fail streams on failure detector downs (CASSANDRA-3569)
+ * Add optional keyspace to DROP INDEX statement (CASSANDRA-7314)
+ * Reduce run time for CQL tests (CASSANDRA-7327)
+ * Fix heap size calculation on Windows (CASSANDRA-7352, 7353)
+ * RefCount native frames from netty (CASSANDRA-7245)
+ * Use tarball dir instead of /var for default paths (CASSANDRA-7136)
+ * Remove rows_per_partition_to_cache keyword (CASSANDRA-7193)
+ * Fix schema change response in native protocol v3 (CASSANDRA-7413)
+Merged from 2.0:
+ * Fix assertion error in CL.ANY timeout handling (CASSANDRA-7364)
* Add per-CF range read request latency metrics (CASSANDRA-7338)
* Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
- * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
- * Swap local and global default read repair chances (CASSANDRA-7320)
- * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
- * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
- * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
- * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
- * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
- * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
- * Add authentication support to shuffle (CASSANDRA-6484)
- * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
* Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
* Fix infinite loop on exception while streaming (CASSANDRA-7330)
- * Reference sstables before populating key cache (CASSANDRA-7234)
* Account for range tombstones in min/max column names (CASSANDRA-7235)
* Improve sub range repair validation (CASSANDRA-7317)
* Accept subtypes for function results, type casts (CASSANDRA-6766)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/8aa2b791/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
[3/8] git commit: Fix inconsistent use of consistencyForCommit that
allowed LOCAL_QUORUM operations to incorrect become full QUORUM patch by
Sankalp Kohli; reviewed by jbellis for CASSANDRA-7345
Posted by jb...@apache.org.
Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM operations to incorrect become full QUORUM
patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7345
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2b973b9e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2b973b9e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2b973b9e
Branch: refs/heads/cassandra-2.0
Commit: 2b973b9ed1c1c6bd1c5b0c756cae12db434f02c0
Parents: 900f29c
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 21:35:50 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 21:35:50 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 ++
src/java/org/apache/cassandra/service/StorageProxy.java | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b973b9e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c74b27d..365722f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
2.0.10
* Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+ * Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM
+ operations to incorrect become full QUORUM (CASSANDRA-7345)
2.0.9
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b973b9e/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 3b10cff..c606d75 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -217,7 +217,7 @@ public class StorageProxy implements StorageProxyMBean
List<InetAddress> liveEndpoints = p.left;
int requiredParticipants = p.right;
- UUID ballot = beginAndRepairPaxos(start, key, metadata, liveEndpoints, requiredParticipants, consistencyForPaxos);
+ UUID ballot = beginAndRepairPaxos(start, key, metadata, liveEndpoints, requiredParticipants, consistencyForPaxos, consistencyForCommit);
// read the current values and check they validate the conditions
Tracing.trace("Reading existing values for CAS precondition");
@@ -302,7 +302,7 @@ public class StorageProxy implements StorageProxyMBean
* @return the Paxos ballot promised by the replicas if no in-progress requests were seen and a quorum of
* nodes have seen the mostRecentCommit. Otherwise, return null.
*/
- private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List<InetAddress> liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos)
+ private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List<InetAddress> liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit)
throws WriteTimeoutException
{
long timeout = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getCasContentionTimeout());
@@ -338,7 +338,7 @@ public class StorageProxy implements StorageProxyMBean
Commit refreshedInProgress = Commit.newProposal(inProgress.key, ballot, inProgress.update);
if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false, consistencyForPaxos))
{
- commitPaxos(refreshedInProgress, ConsistencyLevel.QUORUM);
+ commitPaxos(refreshedInProgress, consistencyForCommit);
}
else
{
@@ -1140,16 +1140,17 @@ public class StorageProxy implements StorageProxyMBean
int requiredParticipants = p.right;
// does the work of applying in-progress writes; throws UAE or timeout if it can't
+ final ConsistencyLevel consistencyForCommitOrFetch = consistency_level == ConsistencyLevel.LOCAL_SERIAL ? ConsistencyLevel.LOCAL_QUORUM : ConsistencyLevel.QUORUM;
try
{
- beginAndRepairPaxos(start, command.key, metadata, liveEndpoints, requiredParticipants, consistency_level);
+ beginAndRepairPaxos(start, command.key, metadata, liveEndpoints, requiredParticipants, consistency_level, consistencyForCommitOrFetch);
}
catch (WriteTimeoutException e)
{
throw new ReadTimeoutException(consistency_level, 0, consistency_level.blockFor(Keyspace.open(command.ksName)), false);
}
- rows = fetchRows(commands, consistency_level == ConsistencyLevel.LOCAL_SERIAL ? ConsistencyLevel.LOCAL_QUORUM : ConsistencyLevel.QUORUM);
+ rows = fetchRows(commands, consistencyForCommitOrFetch);
}
else
{
[8/8] git commit: Merge branch 'cassandra-2.1' into trunk
Posted by jb...@apache.org.
Merge branch 'cassandra-2.1' into trunk
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/beea5d68
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/beea5d68
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/beea5d68
Branch: refs/heads/trunk
Commit: beea5d68cfadc2065c70bb605db3105130a9c351
Parents: 652a7ea 8aa2b79
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 21:37:05 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 21:37:05 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 3 +++
src/java/org/apache/cassandra/service/StorageProxy.java | 11 ++++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/beea5d68/CHANGES.txt
----------------------------------------------------------------------
[4/8] git commit: Fix inconsistent use of consistencyForCommit that
allowed LOCAL_QUORUM operations to incorrect become full QUORUM patch by
Sankalp Kohli; reviewed by jbellis for CASSANDRA-7345
Posted by jb...@apache.org.
Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM operations to incorrect become full QUORUM
patch by Sankalp Kohli; reviewed by jbellis for CASSANDRA-7345
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2b973b9e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2b973b9e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2b973b9e
Branch: refs/heads/trunk
Commit: 2b973b9ed1c1c6bd1c5b0c756cae12db434f02c0
Parents: 900f29c
Author: Jonathan Ellis <jb...@apache.org>
Authored: Thu Jun 26 21:35:50 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Thu Jun 26 21:35:50 2014 -0500
----------------------------------------------------------------------
CHANGES.txt | 2 ++
src/java/org/apache/cassandra/service/StorageProxy.java | 11 ++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b973b9e/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c74b27d..365722f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,5 +1,7 @@
2.0.10
* Fix race in FileCacheService RemovalListener (CASSANDRA-7278)
+ * Fix inconsistent use of consistencyForCommit that allowed LOCAL_QUORUM
+ operations to incorrect become full QUORUM (CASSANDRA-7345)
2.0.9
http://git-wip-us.apache.org/repos/asf/cassandra/blob/2b973b9e/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 3b10cff..c606d75 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -217,7 +217,7 @@ public class StorageProxy implements StorageProxyMBean
List<InetAddress> liveEndpoints = p.left;
int requiredParticipants = p.right;
- UUID ballot = beginAndRepairPaxos(start, key, metadata, liveEndpoints, requiredParticipants, consistencyForPaxos);
+ UUID ballot = beginAndRepairPaxos(start, key, metadata, liveEndpoints, requiredParticipants, consistencyForPaxos, consistencyForCommit);
// read the current values and check they validate the conditions
Tracing.trace("Reading existing values for CAS precondition");
@@ -302,7 +302,7 @@ public class StorageProxy implements StorageProxyMBean
* @return the Paxos ballot promised by the replicas if no in-progress requests were seen and a quorum of
* nodes have seen the mostRecentCommit. Otherwise, return null.
*/
- private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List<InetAddress> liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos)
+ private static UUID beginAndRepairPaxos(long start, ByteBuffer key, CFMetaData metadata, List<InetAddress> liveEndpoints, int requiredParticipants, ConsistencyLevel consistencyForPaxos, ConsistencyLevel consistencyForCommit)
throws WriteTimeoutException
{
long timeout = TimeUnit.MILLISECONDS.toNanos(DatabaseDescriptor.getCasContentionTimeout());
@@ -338,7 +338,7 @@ public class StorageProxy implements StorageProxyMBean
Commit refreshedInProgress = Commit.newProposal(inProgress.key, ballot, inProgress.update);
if (proposePaxos(refreshedInProgress, liveEndpoints, requiredParticipants, false, consistencyForPaxos))
{
- commitPaxos(refreshedInProgress, ConsistencyLevel.QUORUM);
+ commitPaxos(refreshedInProgress, consistencyForCommit);
}
else
{
@@ -1140,16 +1140,17 @@ public class StorageProxy implements StorageProxyMBean
int requiredParticipants = p.right;
// does the work of applying in-progress writes; throws UAE or timeout if it can't
+ final ConsistencyLevel consistencyForCommitOrFetch = consistency_level == ConsistencyLevel.LOCAL_SERIAL ? ConsistencyLevel.LOCAL_QUORUM : ConsistencyLevel.QUORUM;
try
{
- beginAndRepairPaxos(start, command.key, metadata, liveEndpoints, requiredParticipants, consistency_level);
+ beginAndRepairPaxos(start, command.key, metadata, liveEndpoints, requiredParticipants, consistency_level, consistencyForCommitOrFetch);
}
catch (WriteTimeoutException e)
{
throw new ReadTimeoutException(consistency_level, 0, consistency_level.blockFor(Keyspace.open(command.ksName)), false);
}
- rows = fetchRows(commands, consistency_level == ConsistencyLevel.LOCAL_SERIAL ? ConsistencyLevel.LOCAL_QUORUM : ConsistencyLevel.QUORUM);
+ rows = fetchRows(commands, consistencyForCommitOrFetch);
}
else
{