This is a follow-up ticket of PYTHON-497. According to our internal discussion, we would like to improve the Counter column to be more intuitive. The main issues are the following:
We need to read the row before updating the counter
It doesn't work well if we need to scale horizontally.. due to how the CounterUpdateClause is done internally. Before doing the counter update, we need to read the current row and store the current counter value, then the value sent in the update clause will be (new_value - current_value). But the current_value might have changed on the server in the meantime.
The suggested refactor is:
The counter values can *only* be incremented with __add:
The counter values can *only* be decremented with __sub:
Other kind of updates and assignments should be disallowed