[MXS-2114] Pause service after all transactions are complete Created: 2018-10-26  Updated: 2020-08-25  Resolved: 2019-04-15

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: None
Fix Version/s: 2.4.0

Type: New Feature Priority: Critical
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None


 Description   

A feature to pause the execution of queries once all active transactions have finished would allow controlled switchover of masters without needing to replay transactions.

Another feature that closely matches this is the ability to put a server into maintenance without forcefully closing open transactions. Having a grace period during which open transactions can finish would guarantee a consistent point in time at which the connection is closed. This also removes the need to replay the transaction in the case where a server is put into maintenance mode.

There are three modes of operation that make this feature very compelling:

  • Set server maintenance but wait for transactions to complete, effectively draining one server: set server 10.8.1.105 maintenance with-drain
  • Put all servers into maintenance mode at once, effectively draining all servers: set server ALL maintenance with-drain
  • Put all servers into maintenance mode before a shutdown: shutdown maxscale with-drain


 Comments   
Comment by markus makela [ 2019-03-19 ]

Aiming to add this to 2.4 in the hopes to have a way to "cleanly" break connections at transaction boundaries.

Comment by markus makela [ 2019-04-04 ]

Implemented this for 2.4.0 in a way where the maintenance mode for a master is ignored if there is an open transaction to a readwritesplit service. To complement this, the maxctrl set server command now accepts a --force option that closes all connections immediately.

Generated at Thu Feb 08 04:11:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.