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 finally send insert command to specific row key passing the diff to update the counter. All works fine. I got the correct values and diffs but, after insert command, the value of row key is not the expected. Example: Real Value = 35000 Current DB Value = 30000 Diff Value = 5000 I sent the insert command passing diff=5000 so, the expected new DB value should be 35000. But sometimes the new DB value is a crazy negative number, like -360.000. It doesn't make any sense, because there's no combination of values and operators that could result on a value like that. And, if i run the script again, the final persisted value is correct. If I try again later the final persisted value appears wrong again... Can anyone help me with this ? The same script sometimes works fine and sometimes persists a crazy value. Thank you !