Skip to content

Fix halt on 'PROXYSQL RESUME' command - Port of #4757 #4758

Merged
renecannao merged 3 commits intov3.0from
v3.0-fix_hang_on_resume
Nov 26, 2024
Merged

Fix halt on 'PROXYSQL RESUME' command - Port of #4757 #4758
renecannao merged 3 commits intov3.0from
v3.0-fix_hang_on_resume

Conversation

@JavierJF
Copy link
Collaborator

This PR is a port of #4757 to branch v3.0. For further details please go to #4757.

During a RESUME operation, if a 'MySQL_Thread' is bootstrapping
listeners (in `MySQL_Thread::run_BootstrapListener`) and detect that
`MySQL_Threads_Handler::bootstrapping_listeners` is 'false', the thread
prematurely shuts down its own bootstrapping flag from 'mypolls'
(`ProxySQL_Poll::bootstrapping_listeners`). Since this thread wont ever
bootstrap its corresponding listening sockets, the other working threads
will be stalled waiting on it, eventually triggering the watchdog and
crashing the instance.

Since the bootstrapping operation is sequential, it's expected that all
the threads but the one starting their listening sockets are in an
active wait. A sensible delay has been introduced to reduce the overhead
of such wait.
Since the operation of stopping each worker thread listeners is
performed during 'maintenance_loops', the active wait taking place in
'listener_del' is likely to take some time. A sensible delay has been
added to reduce unneccesary load.
This is a follow-up of commit #19c8f8698
@renecannao renecannao merged commit ca1d207 into v3.0 Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants