|
|
|
|
|
by qouteall
180 days ago
|
|
In real-world business requirements it often need to read some data then touch other data based on previous read result. It violates the "every transaction can only be in one shard" constraint. For a specific business requirement it's possible to design clever sharding to make transaction fit into one shard. However new business requirements can emerge and invalidate it. "Every transaction can only be in one shard" only works for simple business logics. |
|
You can also still do optimistic concurrency across shards! That covers most of the remaining ones. Anything that requires anything more complex — sagas, 2PC, etc. — is relatively rare, and at scale, a traditional SQL OLTP will also struggle with those.