Re: Unexpected value after insert

2013-11-05 Thread Christopher Smith
Okay, if it is a counter you are going to have a hell of a time getting it a value. Best advice I can give is to up consistency levels on operations on the fields. On Tuesday, November 5, 2013, Luiz Carlos Jr wrote: > Hi Christopher, > > Sorry about the wrog information... I checked the column fa

Re: Unexpected value after insert

2013-11-05 Thread Luiz Carlos Jr
Hi Christopher, Sorry about the wrog information... I checked the column family and it's really defined as a counter. On Tue, Nov 5, 2013 at 8:39 PM, Christopher Smith wrote: > If it isn't a counter type, then why calculate the diff value, just do the > insert. > > > On Tue, Nov 5, 2013 at 2:2

Re: Unexpected value after insert

2013-11-05 Thread Luiz Carlos Jr
Hi Jacob ! How are you ? You understood perfectly the problem. I need to fix an integer field by reading it, calculating the difference and writing back the correct value (in other words, increment it with the diff, positive or negative to achieve the correct value). As I said it works sometimes

Re: Unexpected value after insert

2013-11-05 Thread Christopher Smith
If it isn't a counter type, then why calculate the diff value, just do the insert. On Tue, Nov 5, 2013 at 2:28 PM, Luiz Carlos Jr wrote: > Hi Christopher, > > Actually it's not a counter, but just a field that stores integers. I'm > logging the expected values but not the command itself because

Re: Unexpected value after insert

2013-11-05 Thread Luiz Carlos Jr
Hi Christopher, Actually it's not a counter, but just a field that stores integers. I'm logging the expected values but not the command itself because I'm using pycassa to send it. I'm absolutely sure that it's not an overflow case. I'm talking about numbers in order of 10~100k with no math operat

Re: Unexpected value after insert

2013-11-05 Thread Jacob Rhoden
Hi Luiz, On 5 Nov 2013, at 12:37 am, Luiz Carlos Jr wrote: > What script does is: get the real value that should be at database, get the > current value that is persisted at database, calculates the difference > between values and finally send insert command to specific row key passing > the diff

Re: Unexpected value after insert

2013-11-05 Thread Christopher Smith
Given your use case I'd recommend not using a counter for the field. Are you logging the update command you are sending Cassandra? Are you sure you aren't overflowing the value either in Cassandra or in your batch code? On Monday, November 4, 2013, Luiz Carlos Jr wrote: > Hi ! > > I have a scrip

Unexpected value after insert

2013-11-04 Thread Luiz Carlos Jr
Hi ! I have a script written in python that should update a counter in Cassandra. It acts like a batch that corrects the counter. What script does is: get the real value that should be at database, get the current value that is persisted at database, calculates the difference between values and f