Comments (4)
This is very well written. Everything I could think of on a first read has already been addressed.
One minor suggestion is to change this wording to be clearer (it has been used in 2 places):
Distributed Transaction - VTGate restart after transaction prepared on partial RMs -> Distributed Transaction - VTGate restart after transaction prepared on a subset of RMs
from vitess.
Just some thoughts and questions -
With respect to Distributed Transaction Identifier (DTID) Generation
. In proposal 3 why do we need a nano ID? If we are going to get the DTID from the MM, then can't it just use auto-incrementing numbers after the keyspace shard? Since the transaction will be written to the MM's mysql table for the creation to be successful. We can initialize the initial value with 1 more than the max available in the said table. This will prevent collisions even across restarts, reparents, or any other issues.
For Transaction Resolution Design
, In proposal 2, we can get VTOrc to just run the Resolution code too. It is only going to entail calling RPCs against vttablet. If we create a common function in a package, we can get VTOrc to do it too. For example, we don't get VTOrc to tell vtctld to run PRS/ERS, it just runs it. The same concept here can be used.
For Prepared Transactions Connection Stability
. I'm just summarizing what we already discussed before. If we decide to go ahead with Proposal 1, then we need to make sure that the Unix socket connections can't be dropped by MySQL. If for whatever reason MySQL drops a connection that is running a distributed transaction, any other write that was blocked on the same rows might go through, and then the distributed transaction's state would be unrecoverable.
There is a proper fix for read and write exclusion but it entails doing locking at a level higher than MySQL connection using a shadow table as implemented by dropbox. That has a significant performance penalty however.
Edit: ☝️ is essentially the same as proposed in the next section's first proposal too. We would just overload the shadow table for also read/write exclusion.
from vitess.
Could you explain case 4? Why do we rollback the transactions on RM1 and RM2? There was no transaction preparation done before this, right?
from vitess.
Could you explain case 4? Why do we rollback the transactions on RM1 and RM2? There was no transaction preparation done before this, right?
We still have open transactions so we should roll them back otherwise they will remain holding locks till transaction timeout is not achieved.
from vitess.
Related Issues (20)
- Feature Request: Add support for StalledDiskPrimary recoveries by vtorc
- Feature Request: per-tablet override to Durability Policy promotion rule HOT 1
- Bug Report: Waiting for semi-sync ACK blocks backup from primary tablet HOT 6
- Bug Report: Panic in vtgate schema manager because of keyspace rules
- Bad Query Plan with Incorrect WHERE Clause and Missing Bind Variable in Sharded Query
- Feature Request: Vitess provide a vtgate queries metric by tablet type HOT 2
- Bug Report: v19 tablet server config parsing incorrect HOT 2
- Bug Report: Online DDL: zero date possible in `_vt.schema_migrations.last_throttled_timestamp`
- Bug Report: Panic in query planning of a query using user defined aggregation function
- Bug Report: Regression in subquery planning wrt v18
- VTAdmin to use VTGate's vexplain HOT 2
- Feature Request: Per-table VStream COPY
- Support recursive CTEs
- Feature Request: ability to control streamer snapshot method (GTID tracking vs table locking) HOT 2
- Feature Request: clarify flag documentation for --db_charset
- Bug Report: MySQL 8.4 default configuration contains removed configuration variable `default_authentication_plugin`
- Feature Request: Add more flexibility backing up/restoring from different backup engines. HOT 1
- Feature Request: allow current/before `PRIMARY` to be specified in PRS
- Bug Report: Uncorrelated subquery with a aggregation is not working HOT 1
- Optimize `schemadiff` inter-dependent diff computation path HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vitess.