epugh commented on code in PR #5353:
URL: https://github.com/apache/solr/pull/5353#discussion_r4652322298
##########
solr/core/src/java/org/apache/solr/cli/SnapshotListTool.java:
##########
@@ -98,20 +95,9 @@ void listSnapshots(SnapshotListParams params) throws
Exception {
}
public void listSnapshots(SolrClient solrClient, String collectionName) {
- CollectionAdminRequest.ListSnapshots listSnaps =
- new CollectionAdminRequest.ListSnapshots(collectionName);
- CollectionAdminResponse resp;
try {
- resp = listSnaps.process(solrClient);
- if (resp.getStatus() != 0) {
- throw new IllegalStateException(
- "The LISTSNAPSHOTS request failed. The status code is " +
resp.getStatus());
- }
-
- NamedList<?> apiResult =
- (NamedList<?>)
resp.getResponse().get(SolrSnapshotManager.SNAPSHOTS_INFO);
- apiResult.forEach((name, value) -> echo(name));
-
+ var response = new
CollectionSnapshotsApi.ListSnapshots(collectionName).process(solrClient);
Review Comment:
i see... took me and claude a bit to figure out what you mean, that the
bug is already here, this PR just exposes it... I actually have similar
worries for our v2 api calls in the Admin UI, though I have never tested that...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]