This is an automated email from the ASF dual-hosted git repository.
HoustonPutman pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_10x by this push:
new 63f894dba44 SOLR-18083: GetSegmentData should work in read-only mode
as well (#4315)
63f894dba44 is described below
commit 63f894dba4462d9f27f355156e95e7b80a986199
Author: Houston Putman <[email protected]>
AuthorDate: Tue Jun 2 14:01:31 2026 -0700
SOLR-18083: GetSegmentData should work in read-only mode as well (#4315)
(cherry picked from commit f2aaf8769fde0fd2f18037e28e49d20fb071fbd3)
---
.../src/java/org/apache/solr/handler/admin/api/GetSegmentData.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
b/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
index fb11371c6e8..2d949b571b6 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/api/GetSegmentData.java
@@ -153,7 +153,7 @@ public class GetSegmentData extends JerseyResource
implements SegmentsApi {
coreSummary.indexDir = core.getIndexDir();
coreSummary.sizeInGB = (double) core.getIndexSize() / GB;
- RefCounted<IndexWriter> iwRef =
core.getSolrCoreState().getIndexWriter(core);
+ RefCounted<IndexWriter> iwRef =
core.getSolrCoreState().getIndexWriter(core, false);
if (iwRef != null) {
try {
IndexWriter iw = iwRef.get();
@@ -257,7 +257,7 @@ public class GetSegmentData extends JerseyResource
implements SegmentsApi {
SolrQueryRequest req, SegmentInfos infos, List<String> mergeCandidates)
throws IOException {
final var result = new HashMap<String, Object>();
RefCounted<IndexWriter> refCounted =
- req.getCore().getSolrCoreState().getIndexWriter(req.getCore());
+ req.getCore().getSolrCoreState().getIndexWriter(req.getCore(), false);
try {
IndexWriter indexWriter = refCounted.get();
if (indexWriter instanceof SolrIndexWriter) {