[MXS-3782] session_track_trx_state set to true causes incorrect routing of SELECT Created: 2021-09-23 Updated: 2022-01-03 Resolved: 2021-10-19 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | readwritesplit |
| Affects Version/s: | 2.5.15 |
| Fix Version/s: | 2.5.17 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kyle Joiner (Inactive) | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
Any of the following conditions inside a transaction can cause the following SELECT to return the incorrect value: Client connects to maxscale, which is configured with session_track_trx_state = TRUE The failing action is the next one, namely: Client performs a SELECT operation immediately after the `INSERT... RETURNING` statement which involves data from the previously inserted row |
| Comments |
| Comment by George Diamantopoulos [ 2021-10-01 ] |
|
Hello, I'm one of the people involved in the reporting of the original bug report with MariaDB ES support. To clarify, these are not conditions any of which can lead to the read-after-write inconsistency. All must be true for the issue to manifest. The problem doesn't arise if even one of these steps is omitted (for example, just disabling session_track_trx_state is sufficient to mitigate this, or keeping session_track_trx_state enabled but doing `start transaction` instead of autocommit=0 also prevents the issue from occuring). |
| Comment by markus makela [ 2021-10-11 ] |
|
kjoiner can you create a simple test case that reproduces this problem? I'm not exactly sure what the real problem is here. |