bramhanandlingala commented on PR #69608: URL: https://github.com/apache/airflow/pull/69608#issuecomment-4932993219
Hi @Miretpl Thanks for the review — updated the comment wording per your suggestion. On && sleep 20, I'd like to keep it. killall -INT pgbouncer returns as soon as the signal is sent, not once pgbouncer finishes draining — so without a delay after it, Kubernetes immediately sends SIGTERM next. Per pgbouncer's docs, SIGTERM arriving while a SIGINT-triggered shutdown is still in progress escalates to an immediate/hard shutdown, killing connections that hadn't finished draining yet — close to the exact bug this PR fixes. The sleep 20 is what gives pgbouncer time to finish gracefully before that second signal can reach it. I'd rather keep it as-is, and I'm happy to add a comment explaining this. Let me know if there's something pgbouncer/Kubernetes-specific I'm missing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
