← Back to Pull requests

SOLR-18343: Require explicit HTTP methods for admin requests #4861

Closed
unknown closed this pull request without merging on Sep 04, 2026 00:16 UTC
View on GitHub
unknown unknown commented on Sep 01, 2026 04:51 UTC
Author

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

Description

SolrJ's multi-action admin request classes currently default to GET, including requests that modify server state.

Solution

This adds constructors that require an HTTP method and updates the Collection, Core, and ConfigSet admin requests to choose GET or POST explicitly. The existing GET-defaulting constructors remain available but are deprecated for compatibility.

Read-only requests use GET. Other admin actions use POST.

I used an AI coding assistant to audit the constructor call sites, make the mechanical edits, and run validation. I reviewed the final diff and the method chosen for each action.

Tests

  • ./gradlew tidy

  • Focused SolrJ tests: 21 tests passed

  • :solr:core:ecjLintTest

  • :solr:solrj:check
  • The full ./gradlew check -x test reached the Antora documentation build, which failed because the local checkout path contains spaces.

    Checklist

  • I have reviewed the contribution guidelines.

  • I have added the Jira issue ID to the PR title.

  • I developed the patch against main.

  • I added tests for the changes.

  • I have run the complete ./gradlew check.

  • I added Reference Guide documentation. Not needed for this SolrJ API change.

  • I added a changelog entry. Not added while the Jira issue is unassigned.
  • Diff: 167 lines (+125 / -42) across 2 files Reviewer: zhangxinyao88 Review duration: 4045m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.35) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.35 · 167 lines diff across 2 files
    0.35
    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%
    56%
    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.307
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4861"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% 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: 35.1% (MEDIUM) · Higher = larger blast radius
    35.1%
    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: 56.8% · Lower = rushed or shallow review
    56.8%
    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: 15.2% · Safe to merge
    15.2%
    Repository