← Back to Pull requests

SOLR-18644: bin/solr.cmd should honour SOLR_PID_DIR #5325

Closed
unknown closed this pull request without merging on Nov 13, 2026 21:04 UTC
View on GitHub
unknown unknown commented on Nov 12, 2026 10:27 UTC
Author

https://issues.apache.org/jira/browse/SOLR-18644

bin\solr.cmd hardcoded %SOLR_TIP%\bin as the place to write and read the files that record running nodes, in five places. bin/solr has defaulted SOLR_PID_DIR to the same directory since forever and uses the variable throughout, and SolrProcessManager reads the solr.pid.dir system property that bin/solr passes from it — so Windows was the only one of the three ignoring it.

A user who sets SOLR_PID_DIR on Windows is silently ignored today: the port files land in %SOLR_TIP%\bin, and stop --all and status then look there too. Self-consistent, but not what was asked for, and not what the documentation promises — solr-control-script-reference.adoc states that status uses SOLR_PID_DIR, and taking-solr-to-production.adoc tells 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, and stop --all then finds nothing to stop.

What changed

One default, next to the existing SOLR_TIP handling, and the five hardcoded paths replaced:

IF NOT DEFINED SOLR_PID_DIR set "SOLR_PID_DIR=%SOLR_TIP%\bin"

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_DIR set, the port file is written there, and stop --all and status find 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 --all walks this directory. This will land on main first, then we can remove the same fix from #5323

🤖 AI Assisted

Diff: 225 lines (+168 / -57) across 2 files Reviewer: janhoy Review duration: 2076m
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
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 36.9% (MEDIUM) · Higher = larger blast radius
36.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.6% · Safe to merge
14.6%
Repository