[MDEV-13233] Idle transaction timeouts kills connections rather than transactions Created: 2017-07-02 Updated: 2017-07-06 Resolved: 2017-07-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.3 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Note: Possibly it's just a documentation issue; if it is so, please switch the category. If idle_transaction_timeout or its siblings are set, and the timeout is exceeded, not only the open transaction closes, but the entire session (connection) gets dropped.
Killing the entire session seems to be excessive for the declared goal, but if it has to be so, please document it properly. The difference in semantics is similar to KILL <id> vs KILL QUERY <id>, and it is essential for setting up proper workflow and tuning applications which might be affected by the timeouts.
|
| Comments |
| Comment by Sergey Vojtovich [ 2017-07-06 ] |
|
According to plinux comment this feature is mostly used to cope with broken application that forget to commit/rollback. For such applications it doesn't make too much difference how their transaction was interrupted. I believe decent applications have to handle "lost connection" independently of this feature. But I agree it is excessive. The reason for this approach was simplicity: interrupting transaction without killing connection is a lot more complex. It is fairly simple to interrupt running command: just set a flag and wake thread if it is sleeping. In this case there's no command running. It is also unclear how error should be reported: subsequent statement returns error? Or all subsequent statements fail until explicit rollback is issued? I don't think we should bother implementing fair transaction termination at least until there's reasonable need for this. greenman, could you adjust manual so that it reflects that connection is terminated when transaction timeouts? |
| Comment by Ian Gilfillan [ 2017-07-06 ] |
|
Docs now specify that the connection is killed |