---
title: "Comment by Sai Kiran Kshatriya on \"Bringing AI Context Closer to Users with CockroachDB Table Localities\" | Hashnode"
description: "Thank you for taking time and reading through the post. Fair point, with one nuance: the move itself can be atomic. CockroachDB is serializable, so a single UPD"
url: "https://hashnode.com/posts/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities/6aece9a441baeaa54dcb90a4/comment/6af72473950b3378746380c3"
---

[Discussion](https://hashnode.com/posts/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities/6aece9a441baeaa54dcb90a4)

Comment [Bringing AI Context Closer to Users with CockroachDB Table Localities](https://hashnode.com/posts/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities/6aece9a441baeaa54dcb90a4)

[Sai Kiran Kshatriya](https://hashnode.com/@saikirankshatriya)

[Nov 13](https://hashnode.com/posts/bringing-ai-context-closer-to-users-with-cockroachdb-table-localities/6aece9a441baeaa54dcb90a4/comment/6af72473950b3378746380c3)

Thank you for taking time and reading through the post.

Fair point, with one nuance: the move itself can be atomic. CockroachDB is serializable, so a single UPDATE of a tenant's crdb\_region is all-or-nothing. The real gap is that my retrieval query trusts an application-supplied region. A cleaner design keeps tenant placement in a GLOBAL tenants table and resolves the region inside the query, so the rows and the pointer change in the same transaction. For tenants too big for one transaction, a migrating status would widen reads to both regions until cutover. A fixture that keeps retrieving during the move and checks completeness is a good addition. I'll cover this in a follow-up.
