Search code examples
atomicregiongoogle-cloud-bigtable

Is the BigTable CheckAndMutateRow functionaly atomic across multiple regions?


The Bigtable CheckAndMutateRow functionality is documented here:

https://cloud.google.com/bigtable/docs/writes#conditional

It clearly says that it is atomic. However, it does not mention anything about a multi-node and/or multi-region setup.

Have you used this functionality and have you found out whether it was atomic for the entire cluster? (which is what I'm hoping for)

I need to write some data once and never overwrite it. So I want to use the CheckAndMutateRow with a noMatch condition. Easy enough up to here. But this can happen from various locations such as US, China, Germany and Brazil. If all four regions attempt such a function, will it indeed be atomic between regions or is the atomicity limited to a region (i.e. just 'us-central1')?


Solution

  • Bigtable transactions are atomic only for cells within a single row (single-row transactions). Bigtable does not support atomic operations over multiple rows or across tables. It might mean you cannot perform an atomic CheckAndMutateRow operation if the data is spread across different regions. See this Bigtable best practices.

    If that will be the case, you can also consider filing a feature request so that the Google Cloud Bigtable database engineering team can look into it. Please note that they won't be able to provide a date for when this will be implemented or if it will be implemented at all.