Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
	CHANGES.txt
This commit is contained in:
Sylvain Lebresne 2014-03-17 11:08:47 +01:00
commit 67119a5ab5
3 changed files with 7 additions and 5 deletions

View File

@ -82,6 +82,8 @@ Merged from 2.0:
* Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844) * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
* Fix CompactionManager.needsCleanup (CASSANDRA-6845) * Fix CompactionManager.needsCleanup (CASSANDRA-6845)
* Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779) * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779)
* Read message id as string from earlier versions (CASSANDRA-6840)
* Properly use the Paxos consistency for (non-protocol) batch (CASSANDRA-6837)
2.1.0-beta1 2.1.0-beta1

View File

@ -1,5 +1,5 @@
Apache Cassandra Apache Cassandra
Copyright 2009, 2010 The Apache Software Foundation Copyright 2009-2014 The Apache Software Foundation
This product includes software developed by The Apache Software This product includes software developed by The Apache Software
Foundation (http://www.apache.org/). Foundation (http://www.apache.org/).

View File

@ -183,7 +183,7 @@ public class BatchStatement implements CQLStatement, MeasurableForPreparedCache
if (options.getConsistency() == null) if (options.getConsistency() == null)
throw new InvalidRequestException("Invalid empty consistency level"); throw new InvalidRequestException("Invalid empty consistency level");
return execute(new PreparedBatchVariables(options.getValues()), false, options.getConsistency(), queryState.getTimestamp()); return execute(new PreparedBatchVariables(options.getValues()), false, options.getConsistency(), options.getSerialConsistency(), queryState.getTimestamp());
} }
public ResultMessage executeWithPerStatementVariables(ConsistencyLevel cl, QueryState queryState, List<List<ByteBuffer>> variables) throws RequestExecutionException, RequestValidationException public ResultMessage executeWithPerStatementVariables(ConsistencyLevel cl, QueryState queryState, List<List<ByteBuffer>> variables) throws RequestExecutionException, RequestValidationException
@ -191,16 +191,16 @@ public class BatchStatement implements CQLStatement, MeasurableForPreparedCache
if (cl == null) if (cl == null)
throw new InvalidRequestException("Invalid empty consistency level"); throw new InvalidRequestException("Invalid empty consistency level");
return execute(new BatchOfPreparedVariables(variables), false, cl, queryState.getTimestamp()); return execute(new BatchOfPreparedVariables(variables), false, cl, ConsistencyLevel.SERIAL, queryState.getTimestamp());
} }
public ResultMessage execute(BatchVariables variables, boolean local, ConsistencyLevel cl, long now) public ResultMessage execute(BatchVariables variables, boolean local, ConsistencyLevel cl, ConsistencyLevel serialCl, long now)
throws RequestExecutionException, RequestValidationException throws RequestExecutionException, RequestValidationException
{ {
// TODO: we don't support a serial consistency for batches in the protocol so defaulting to SERIAL for now. // TODO: we don't support a serial consistency for batches in the protocol so defaulting to SERIAL for now.
// We'll need to fix that. // We'll need to fix that.
if (hasConditions) if (hasConditions)
return executeWithConditions(variables, cl, ConsistencyLevel.SERIAL, now); return executeWithConditions(variables, cl, serialCl, now);
executeWithoutConditions(getMutations(variables, local, cl, now), cl); executeWithoutConditions(getMutations(variables, local, cl, now), cl);
return null; return null;