Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,11 @@ The Solr Docker image used in tests is configurable via the `solr.test.image` sy
### Solr 10 Compatibility

Solr 10.0.0 is fully supported with the JSON wire format. The `/admin/mbeans` endpoint was
removed in Solr 10; `getCacheMetrics()` and `getHandlerMetrics()` now catch `RuntimeException`
(which covers `RemoteSolrException`) so they degrade gracefully and return `null`. Tests that
check `cacheStats` and `handlerStats` already handle `null` values.
removed in Solr 10; `getCacheMetrics()` and `getHandlerMetrics()` catch `SolrException` (which
`RemoteSolrException` extends) so they degrade gracefully and return `null`. Tests that check
`cacheStats` and `handlerStats` already handle `null` values. The catch is deliberately *not*
`RuntimeException`: an unrelated runtime failure inside metrics parsing should surface as a bug,
not be silently reported as "metrics unavailable".

Remaining known differences from Solr 9:
- **`/admin/mbeans` removed:** Cache and handler stats from `getCollectionStats()` will always be `null` on Solr 10. A future migration to `/admin/metrics` will restore these metrics.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.apache.solr.client.solrj.response.LukeResponse;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.client.solrj.response.SolrPingResponse;
import org.apache.solr.common.SolrException;
import org.apache.solr.common.params.ModifiableSolrParams;
import org.apache.solr.common.util.NamedList;
import org.apache.solr.mcp.server.config.SolrConfigurationProperties;
Expand Down Expand Up @@ -692,7 +693,7 @@ public QueryStats buildQueryStats(QueryResponse response) {

CacheStats stats = extractCacheStats(coreMetrics);
return isCacheStatsEmpty(stats) ? null : stats;
} catch (SolrServerException | IOException | RuntimeException _) {
} catch (SolrServerException | IOException | SolrException _) {
return null;
}
}
Expand Down Expand Up @@ -810,7 +811,7 @@ private CacheStats extractCacheStats(NamedList<Object> coreMetrics) {

HandlerStats stats = new HandlerStats(selectHandler, updateHandler);
return isHandlerStatsEmpty(stats) ? null : stats;
} catch (SolrServerException | IOException | RuntimeException _) {
} catch (SolrServerException | IOException | SolrException _) {
return null;
}
}
Expand Down