Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 986
user01380121 Avatar asked Dec 24 '22 05:12

user01380121


1 Answers

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

like image 134
Gary Elliott Avatar answered May 16 '23 09:05

Gary Elliott