Repository navigation
refactor(auth): extract forced-password session cleanup and own server teardown (S08-C1b) - #372
Conversation
55d2423 to
febc78d
Compare
88f1525 to
32876c6
Compare
bdedefa to
4701a5f
Compare
fbcb57e to
882583d
Compare
PR 评审:阻碍合入项清单基于当前 head 1. [CI 门禁失败 — 核心阻塞] 新增
|
882583d to
846a7ee
Compare
4701a5f to
6d11a61
Compare
6d11a61 to
1debed0
Compare
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1debed0b06
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| std::thread signalWatcher( | ||
| [&shutdownSigset, &normalExitRequested, &signalHandled, &startupRunner]() { | ||
| int sig = 0; | ||
| if (sigwait(&shutdownSigset, &sig) == 0 && |
There was a problem hiding this comment.
Create the signal watcher after Drogon's process fork
On Linux, the baseline, production, and benchmark configurations enable app.relaunch_on_error, so Drogon forks inside run() (the same behavior is explicitly worked around in tests/test_main.cc:254-259). This watcher is created before that fork: the serving child inherits the blocked SIGTERM/SIGINT mask but not the watcher thread. Consequently, the child cannot consume either shutdown signal and requires SIGKILL instead of performing graceful teardown. Start the watcher in the serving process after Drogon's fork, while arranging signal masking before worker creation.
Useful? React with 👍 / 👎.
| }); | ||
| if (result->get_future().get()) |
There was a problem hiding this comment.
Make the startup-result wait interruptible during shutdown
If shutdown arrives while a startup database operation is pending, requestStop() only interrupts the retry delay; it cannot release this unconditional future wait. The newly added startupRunner.joinAll() therefore prevents process exit until the database callback completes. This can exceed the shutdown grace period with the production database timeout of 60 seconds, or hang indefinitely with the baseline configuration's disabled timeout (timeout: -1.0) when the database is unavailable. Use a bounded, stop-aware wait so joining the startup workers does not depend on database recovery.
Useful? React with 👍 / 👎.
S08-C1b extracts forced-password-change session cleanup at the existing successful refresh-token revocation boundary. The new PostgreSQL HTTP regression also exposed abnormal server shutdown; this PR adds explicit ownership and teardown of startup workers and identity/plugin dependencies.
Changes
Rebase audit
Current head:
1debed0b06fd813415e41729b400f886bcd5709a, based on masterdf6f2cef5c1e2d40878b25f5305db385297741aaafter #379 was merged first.The three commits rebased without conflicts and retain all three stable patch IDs. Net scope remains 15 files; 14 are byte-identical to the approved pre-rebase head. Inverse substitution of the helper reconstructs the entire latest-master SessionController byte-for-byte, preserving all newer upstream changes and the extraction boundary.
Validation on the current head
The existing approval is retained after the audited rebase. All current-head validation listed above is complete and successful; there are no unresolved review threads.