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 and fails in other attempts. i.e. If i run now
it fails... running again then works. I'm "fixing" few records (~30
records) and it fails only in one or two (but not always the same) and
works perfectly to the others. And... if I run again all records got the
correct value. And.... if I run again, some fails.

In the future this script must work with millions of records but I confess
I'm a little insecure right now because it's a very simple operation and it
seems like a Cassandra's bug. Could it be ?

If you need somre more information let me know.

Thank you for the help !

Luiz


On Tue, Nov 5, 2013 at 7:08 PM, Jacob Rhoden <jacob.rho...@me.com> wrote:

> Hi Luiz,
>
> On 5 Nov 2013, at 12:37 am, Luiz Carlos Jr <l...@s1mbi0se.com.br> 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 to update the counter.
>
>
> I would like to make sure I understand what your doing, basically you have
> added some logic that attempts to “fix” the counter, by reading it and
> writing back the correct value?
>
> What happens if you take out the code that attempts to “fix” the counter,
> and run the script again? i.e. Does the counter then eventually increment
> by the number you would expect it to increment. By eventually I mean a
> short period of time after the script has completed.
>
> Best regards,
> Jacob
>
>

Reply via email to