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


##########
solr/core/src/java/org/apache/solr/cli/StatusTool.java:
##########
@@ -243,6 +244,13 @@ public int runTool() throws Exception {
 
     // No URL or port, scan for running processes
     Collection<SolrProcess> procs = processMgr.scanSolrPidFiles();
+    if (procs.isEmpty()) {
+      // Solr started in the foreground writes no PID file, so fall back to 
the process list

Review Comment:
   You can argue both ways here. If you say `solr status` and there is no pid 
files, one could conclude that **this user** has not started any solr procs in 
the **background** from this particular instance dir. 
   
   But what we do when falling back to the entire process list, is that we list 
all Solr's running on the entire node, including those running in the 
foreground (with no PID files). That's a difference, and it is perhaps the 
wanted one?
   
   The mismatch is evident if we **do have a node running in the background** 
with a PID file, then status will list just that one (PID as source for 
processes). But if you stop it and run status again, you'll potentially see a 
ton of running processes, which is weird given you thought you just stopped the 
last one?



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