Possible Counter Bug

33 views
Skip to first unread message

Tamar Fraenkel

unread,
Apr 18, 2012, 3:19:02 AM4/18/12
to hector-users
I created ConfigurableConsistencyLevel with default read and write of
ONE, but with different consistency level for my counter CF, which is
write=TWO and read=ONE.
But when MutationImpe execute runs, and all the mutations are for my
counter family, I see that the method:

public Void execute(Cassandra.Client cassandra) throws Exception {
cassandra.batch_mutate(mutations.getMutationMap(),

ThriftConverter.consistencyLevel(consistencyLevelPolicy.get(operationType)));
return null;
}

reads consistency level ONE.

I see that there is a method:
public HConsistencyLevel get(OperationType op, String cfName) {
if (op == OperationType.READ) {
HConsistencyLevel rcf = readCfConsistencyLevels.get(cfName);
return rcf != null ? rcf : defaultReadConsistencyLevel;
} else {
HConsistencyLevel wcf = writeCfConsistencyLevels.get(cfName);
return wcf != null ? wcf : defaultWriteConsistencyLevel;
}
}

But it is hardly used...

My Questions:
1. Is it a bug?
2. Maybe I can't define different Consistency Levels for different
Column Families?
Thanks,
Tamar

Elyran Kogan

unread,
Apr 18, 2012, 4:09:56 AM4/18/12
to hector...@googlegroups.com
I had the same problem exactly - discussed here:

and an issue has been opened:

Elyran.

--
Thanks,
Elyran Kogan
LivePerson, Inc.
Software Developer
+972 74 700 4387
+972 74 700 4920
13 Zarchin Street
PO Box 2067, Industrial Area
Ra'anana 43100, Israel
Meaningful connections through intelligent engagement.™


This message may contain confidential and/or privileged information. 
If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein. 
If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.

Nate McCall

unread,
Apr 18, 2012, 11:17:22 AM4/18/12
to hector...@googlegroups.com
Thanks for linking in the issue!

Feel free to comment on what the functionality should be there, but know that this is not inherently supported via thrift if you want to maintain the efficiency of a single batch_mutate. 
Reply all
Reply to author
Forward
0 new messages