SOLR-18644: bin/solr.cmd should honour SOLR_PID_DIR #5325
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 225 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.324
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5325"
general
weight: 0.35
janhoy
https://issues.apache.org/jira/browse/SOLR-18644
bin\solr.cmdhardcoded%SOLR_TIP%\binas the place to write and read the files that record running nodes, in five places.bin/solrhas defaultedSOLR_PID_DIRto the same directory since forever and uses the variable throughout, andSolrProcessManagerreads thesolr.pid.dirsystem property thatbin/solrpasses from it — so Windows was the only one of the three ignoring it.A user who sets
SOLR_PID_DIRon Windows is silently ignored today: the port files land in%SOLR_TIP%\bin, andstop --allandstatusthen look there too. Self-consistent, but not what was asked for, and not what the documentation promises —solr-control-script-reference.adocstates thatstatususesSOLR_PID_DIR, andtaking-solr-to-production.adoctells the reader to set it, neither qualified to POSIX. It matters most for a packaged or read-only install, which is the reason the variable exists: if the installation directory is not writable the port file silently never appears, andstop --allthen finds nothing to stop.What changed
One default, next to the existing
SOLR_TIPhandling, and the five hardcoded paths replaced:Same variable, same default, so nothing changes for anyone who does not set it.
Testing
Verified on a Windows 11 ARM64 VM: with
SOLR_PID_DIRset, the port file is written there, andstop --allandstatusfind the node through it; unset, behaviour is unchanged.Bug was found during development of CATS testing harness — it cannot run test classes in parallel on Windows without this fix, since
stop --allwalks this directory. This will land on main first, then we can remove the same fix from #5323🤖 AI Assisted