janhoy commented on code in PR #5358:
URL: https://github.com/apache/solr/pull/5358#discussion_r4615835450


##########
changelog/unreleased/SOLR-18665-start-readiness.yml:
##########
@@ -0,0 +1,13 @@
+# See https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc
+
+title: >
+  `bin/solr start` now waits for the node to be ready, instead of for its port 
to be listening, so a

Review Comment:
   For changelog audience I think this is sufficient.
   
   I was a bit surprised myself to find this bug. I thought port listening == 
ready. But I realize Jetty will open the port before all the web apps have done 
their initialization. So it could be we need an even better "ready" gate than 
what StatusTool uses. But it's a fracion of a second, so perhaps just adding 
the JVM startup time of the StatusTool call is enough to fix what you and I 
experienced? I asked Claude, who answered;
   
   - The status check calls /admin/info/system. Jetty only starts serving 
requests after the Solr webapp has finished starting. In the startup log, 
"Started ServerConnector" comes after the CoreContainer init lines.
   - So any answer at all means CoreContainer.load() has returned. By then 
solr.xml is parsed, the auth plugins are loaded, and in cloud mode the 
ZooKeeper connection is set up.
   
   Recovery and heavy core initialization may not yet be ready but that would 
serve a 503 and a client would re-try. So I think we're good.



-- 
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]

Reply via email to