You cant use int/bigint to say “Set the value 2 above what it is now”, unless you use a read to get the current value, then write using lightweight transactions, which have a significant performance penalty.
The primary reason for this is because no individual Cassandra node is guaranteed to know the current state of any cell at the time the write arrives – counters attempt to solve this From: Kant Kodali <k...@peernova.com> Reply-To: "email@example.com" <firstname.lastname@example.org> Date: Monday, October 17, 2016 at 5:20 PM To: "email@example.com" <firstname.lastname@example.org> Subject: What is the point of counter type when we can do the same thing with int or bigint? I just read the following link https://docs.datastax.com/en/cql/3.3/cql/cql_using/useCounters.html and I wonder what is the point of counter type when we can do the same thing with int or bigint? what are benefits of using counter data type? ____________________________________________________________________ CONFIDENTIALITY NOTE: This e-mail and any attachments are confidential and may be legally privileged. If you are not the intended recipient, do not disclose, copy, distribute, or use this email or any attachments. If you have received this in error please let the sender know and then delete the email and all attachments.
Description: S/MIME cryptographic signature