mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-1.2' into cassandra-2.0
Conflicts: CHANGES.txt src/java/org/apache/cassandra/service/StorageProxy.java
This commit is contained in:
commit
e8aaffa1b7
|
|
@ -15,6 +15,7 @@
|
|||
Merged from 1.2:
|
||||
* Fix availability validation for LOCAL_ONE CL (CASSANDRA-7319)
|
||||
* Use LOCAL_ONE for non-superuser auth queries (CASSANDRA-7328)
|
||||
* Fix handling of empty counter replication mutations (CASSANDRA-7144)
|
||||
|
||||
|
||||
2.0.8
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ public class CounterMutation implements IMutation
|
|||
ColumnFamily cf = row.cf;
|
||||
replicationMutation.add(cf);
|
||||
}
|
||||
return replicationMutation;
|
||||
|
||||
return replicationMutation.isEmpty() ? null : replicationMutation;
|
||||
}
|
||||
|
||||
private void addReadCommandFromColumnFamily(String keyspaceName, ByteBuffer key, ColumnFamily columnFamily, long timestamp, List<ReadCommand> commands)
|
||||
|
|
|
|||
|
|
@ -1077,8 +1077,18 @@ public class StorageProxy implements StorageProxyMBean
|
|||
{
|
||||
public void runMayThrow() throws OverloadedException
|
||||
{
|
||||
// send mutation to other replica
|
||||
sendToHintedEndpoints(cm.makeReplicationMutation(), remotes, responseHandler, localDataCenter);
|
||||
// send the mutation to other replicas, if not null (see CASSANDRA-7144 for details)
|
||||
RowMutation replicationMutation = cm.makeReplicationMutation();
|
||||
if (replicationMutation != null)
|
||||
{
|
||||
sendToHintedEndpoints(replicationMutation, remotes, responseHandler, localDataCenter);
|
||||
}
|
||||
else
|
||||
{
|
||||
// simulate the rest of the responses to avoid the timeout
|
||||
for (int i = 0; i < remotes.size(); i++)
|
||||
responseHandler.response(null);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue