Skip to content

Commit b4f6d75

Browse files
Alex Vakhovvakhov
authored andcommitted
docs: clarify safe DML handling during rebalancing and replicaset addition
- change after review - clarify consequences of skipping DML pause - recommend steps for safe DML after rebalancing or adding replicaset (cherry picked from commits a0fc0736eba8c394885ba1ece9f417e3a7bebf45 2c5e4934692056b5c7ad727ff4480d6acb3316b4 e0a0462b663e4a63894130d67b2aaf1e7d6f4335)
1 parent d39ab75 commit b4f6d75

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,25 @@ For Tarantool 1.10, 2.x and 3.x you can also manually call
123123
the [crud initialization code](#api) on [VShard](https://github.com/tarantool/vshard)
124124
router and storage instances.
125125

126+
> **Note**
127+
>
128+
> Before changing the cluster configuration (for example, adding a new replica set or triggering bucket rebalancing),
129+
> follow these steps to ensure consistent data operations:
130+
>
131+
> 1. Pause all DML operations (insert, update, delete) across your application.
132+
> 2. Apply topology changes or initiate rebalancing.
133+
> 3. Wait until all buckets have finished migrating.
134+
> 4. Clear the route map cache on all routers:
135+
> ```lua
136+
> vshard.router._route_map_clear()
137+
> ```
138+
> 5. Resume DML operations.
139+
>
140+
> Following these steps ensures correct routing and consistent CRUD behavior after topology updates.
141+
>
142+
> Failure to follow these steps may lead to issues such as duplicated records,
143+
> missing updates, or inconsistent state across replica sets due to incorrect routing during rebalancing.
144+
126145
### Sandbox
127146
128147
The repository provide a simple sandbox application with a test dataset on a single instance.

0 commit comments

Comments
 (0)