Jason Gerlowski created SOLR-11526:
--------------------------------------
Summary: CollectionAdminResponse.isSuccess() incorrect for most
admin collections APIs
Key: SOLR-11526
URL: https://issues.apache.org/jira/browse/SOLR-11526
Project: Solr
Issue Type: Improvement
Security Level: Public (Default Security Level. Issues are Public)
Components: SolrJ
Affects Versions: master (8.0)
Reporter: Jason Gerlowski
Priority: Minor
{{CollectionAdminResponse}} has a boolean {{isSuccess}} method which reports
whether the API was called successfully. It returns true if it finds a
non-null NamedList element called "success". It returns false otherwise.
Unfortunately, only a handful of the Collection-Admin APIs have this element.
APIs that don't contain this element in their response will always appear to
have failed (according to {{isSuccess()}}).
The current implementation is correct for:
- CREATECOLLECTION
- RELOAD
- SPLITSHARD
- DELETESHARD
- DELETECOLLECTION
- ADDREPLICA
- MIGRATE
The current implementation is incorrect for:
- CREATESHARD
- CREATEALIAS
- DELETEALIAS
- LISTALIASES
- CLUSTERPROP
- ADDROLE
- REMOVEROLE
- OVERSEERSTATUS
- CLUSTERSTATUS
- REQUESTSTATUS
- DELETESTATUS
- LIST
- ADDREPLICAPROP
- DELETEREPLICAPROP
- BALANCESHARDUNIQUE
- REBALANCELEADERS
(these lists are incomplete)
A trivial fix for this would be to change the implementation to check the
"status" NamedList element (which is present in all Collection-Admin APIs). My
understanding is that the "status' field is set to 0 always on success.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]