Search code examples
google-cloud-bigtable

Can I atomically increment a column value in BigTable?


Does BigTable support atomic increment operations similar to INCR in Redis?

There is this function in the Golang library for BT - https://godoc.org/cloud.google.com/go/bigtable#ReadModifyWrite.Increment. However, I can see a situation where two instances of an app try to increment at the same time, but it's only incremented once due to a race condition.


Solution

  • Bigtable operations are atomic at a row level - you won't encounter a race condition with this API call.