mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-2.0' into cassandra-2.1
Conflicts: CHANGES.txt
This commit is contained in:
commit
67119a5ab5
|
|
@ -82,6 +82,8 @@ Merged from 2.0:
|
|||
* Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
|
||||
* Fix CompactionManager.needsCleanup (CASSANDRA-6845)
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
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
|
||||
Foundation (http://www.apache.org/).
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ public class BatchStatement implements CQLStatement, MeasurableForPreparedCache
|
|||
if (options.getConsistency() == null)
|
||||
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
|
||||
|
|
@ -191,16 +191,16 @@ public class BatchStatement implements CQLStatement, MeasurableForPreparedCache
|
|||
if (cl == null)
|
||||
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
|
||||
{
|
||||
// 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.
|
||||
if (hasConditions)
|
||||
return executeWithConditions(variables, cl, ConsistencyLevel.SERIAL, now);
|
||||
return executeWithConditions(variables, cl, serialCl, now);
|
||||
|
||||
executeWithoutConditions(getMutations(variables, local, cl, now), cl);
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue