[MXS-1549] Aggressive read write split Created: 2017-11-29 Updated: 2018-07-03 Resolved: 2018-07-03 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readwritesplit |
| Affects Version/s: | None |
| Fix Version/s: | 2.3.0 |
| Type: | New Feature | Priority: | Major |
| Reporter: | dapeng huang | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
In many cases, application encapsulate all the statements in transactions, so these applications cannot use read write split service which provided by mxs; Proposal: use SESSION_TRACK_TRANSACTION_CHARACTERISTICS to get current session isolation level; if current session in RC Mode and "not real in a transacion", and target statment's type is read, so this statment can be route to slave; mxs can provide a session variable to enable this route behavior; |
| Comments |
| Comment by markus makela [ 2017-11-29 ] |
|
This requires that a transaction that starts as a read-only transaction can be later applied on the master if it issues a command that causes a transaction to really start. |
| Comment by dapeng huang [ 2018-01-16 ] |
|
markus makela, we have do a survy on our users who use read write split service, to our surprise, 1. need to keep session read consist, so add hint to route to master, or encapsulate all the statement in a transaction; cause this situation is very common among our users, so we need a way to make rwsplit more transparency; found a worklog maybe helpful, https://dev.mysql.com/worklog/task/?id=6631 in RC iso level; we can route first three select to slave, and route DML statement and all the statements behind DML to master; we found in most cases, read is ahead of write, so this may very useful; |
| Comment by markus makela [ 2018-01-16 ] |
|
Yes, we have planned to make the readwritesplit more aggressive so that slave servers are utilized to their full capacity. I believe that a good first step would be to implement A few questions that need to be answered before anything is implemented:
|