janhoy commented on PR #891: URL: https://github.com/apache/solr-operator/pull/891#issuecomment-6991886116
I ran the tests. Kind (k8s 1.33), Solr 9.11.0 and 10.1.0, 3 nodes, 2 shards × 3 replicas, ~10 req/s of indexing and queries throughout, operator built from main vs this PR, 3 pod deletes per combination plus operator-managed rolling restarts. - **Yes, SIGTERM gives the same graceful shutdown as the stop port.** `jetty.xml` sets `stopAtShutdown=true`, and Jetty's stop-port command only stops what is registered with that same JVM shutdown hook, so both paths call the same `Server.stop()`. The logs show the same sequence either way: Jetty stops, CoreContainer shuts down, the live node is removed from ZK, replicas are published DOWN, and cores close with a commit. Only the thread name differs (`ShutdownMonitor` vs `JettyShutdownThread`). Shutdown took under 0.5s and every node left `live_nodes` explicitly, never through session expiry. Recovery times and client errors under load were the same with and without the hook. - **On 10.x the hook is already a no-op** (SOLR-18607), so main relies on SIGTERM there today. - **On the kill -9:** I froze the JVM with SIGSTOP and deleted the pod. Both builds were SIGKILLed by the kubelet at about 60s. With the hook, `solr stop` hung on the frozen stop port and never got to its own kill -9. In theory it could kill 5s before the kubelet (`SOLR_STOP_WAIT` = grace - 5), but only for a JVM that still answers on the stop port. - **It did work when you added it,** in the sense that it stopped Solr. It has also always produced this warning: #227 reported `exited with 137` back in 2021. - **"Just make the hook exit 0" doesn't help on 9.x:** the hook process dies with the container before it can return. I've rebased, and added upgrade notes for the side effects: the old pods emit the event one last time as they roll, containers now exit `143` instead of `0`, and custom images that don't pass SIGTERM on to Solr can set their own `preStop`. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
