emqx / emqx/classy

Do not lower run level on rl_changer terminate

Open
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Erlang
Stars
2
Forks
1
Avg merge
1h 58m
Merged PRs (30d)
1

Description

Changing the run level in the terminate callback is prone to deadlock if the callback is called when classy application stops. The deadlocks happen when run level callbacks also attempt to talk to the application controller.
1. Remove `terminate_loop` from terminate callback and move it to a dedicated API
2. After calling this API the RL server becomes locked, it responds with errors to all attempts to change the run level.
3. User should call this function directly from a safe place that is outside of application callback.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the rl_changer terminate callback and all references to terminate_loop, then trace the RL server's run-level change handling. Implement the dedicated API and verify that calling it locks the server, rejects later run-level changes, and can be invoked outside application callbacks without deadlock.

Written by the indexing model from the issue text.

Assessment

Tech stack
erlang
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.