feat(universaldb): graceful postgres leader handoff on shutdown#5337
Conversation
…der handoff on shutdown
|
PR Review: feat(universaldb): graceful postgres leader handoff on shutdown What the PR Does This PR adds a graceful shutdown path for the UniversalDB Postgres driver. Before this change, when the engine received SIGTERM, the Postgres leader lease would expire after the full TTL (10s) before a standby could take over, turning every rolling deploy into a ~10s commit stall. After this change:
The design is correct in its overall shape. Safety properties are well thought out: Bug: File: self.resolver_handle.abort(); // schedules cancellation only
self.gc_handle.abort();
resolver::handoff(&self.shared).await; // races an in-flight renew
Concrete race:
Recommended fix: Introduce a Issue: No Timeout on File:
Recommended fix: Wrap the handoff body in a Minor: The UPDATE (expire lease) and Style / Conventions Explicit lifetime on trait default ( Double-abort in test ( Test Quality
Security / Correctness The fencing on Summary The design goal is sound and the approach is well-structured. The primary concern before merge is the |
eaee251 to
7399a2d
Compare
No description provided.