mirror of https://github.com/apache/cassandra
avoid adding CFs w/ no data to RowMutation on HH
patch by jbellis; tested by Dan Di Spaltro for CASSANDRA-585 git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@884571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bac1616d85
commit
e0f5809386
|
|
@ -3,6 +3,7 @@
|
|||
* fix possibility of partition when many nodes restart at once
|
||||
in clusters with multiple seeds (CASSANDRA-150)
|
||||
* fix NPE in get_range_slice when no data is found (CASSANDRA-578)
|
||||
* fix potential NPE in hinted handoff (CASSANDRA-585)
|
||||
|
||||
|
||||
0.5.0 beta
|
||||
|
|
|
|||
|
|
@ -112,7 +112,9 @@ public class HintedHandOffManager
|
|||
RowMutation rm = new RowMutation(tableName, key);
|
||||
for (ColumnFamilyStore cfstore : table.getColumnFamilyStores().values())
|
||||
{
|
||||
rm.add(cfstore.getColumnFamily(new IdentityQueryFilter(key, new QueryPath(cfstore.getColumnFamilyName()))));
|
||||
ColumnFamily cf = cfstore.getColumnFamily(new IdentityQueryFilter(key, new QueryPath(cfstore.getColumnFamilyName())));
|
||||
if (cf != null)
|
||||
rm.add(cf);
|
||||
}
|
||||
Message message = rm.makeRowMutationMessage();
|
||||
WriteResponseHandler responseHandler = new WriteResponseHandler(1);
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ public class RowMutation implements Serializable
|
|||
*/
|
||||
public void add(ColumnFamily columnFamily)
|
||||
{
|
||||
assert columnFamily != null;
|
||||
if (modifications_.containsKey(columnFamily.name()))
|
||||
{
|
||||
throw new IllegalArgumentException("ColumnFamily " + columnFamily.name() + " is already being modified");
|
||||
|
|
|
|||
Loading…
Reference in New Issue