You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Gerlowski (JIRA)" <ji...@apache.org> on 2017/10/29 19:33:00 UTC
[jira] [Comment Edited] (SOLR-11526)
CollectionAdminResponse.isSuccess() incorrect for most admin collections
APIs
[ https://issues.apache.org/jira/browse/SOLR-11526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224155#comment-16224155 ]
Jason Gerlowski edited comment on SOLR-11526 at 10/29/17 7:32 PM:
------------------------------------------------------------------
After Varun's previous comment, I wanted to recheck the doc snippets for each of the Collection-Admin APIs, to see which have the {{success}} element, and which don't. Offering the revised list based on actually checking each API.
APIs with {{success}} element ({{isSuccess}} method is "correct" for these today)
- CREATE
- DELETE
- RELOAD
- SPLITSHARD
- CREATESHARD
- DELETESHARD
- ADDREPLICA
- DELETEREPLICA
- BACKUP
- REPLACENODE
- MOVEREPLICA
- MIGRATE
APIs without {{success}} element ({{isSuccess}} method incorrect for these today)
- LIST
- MODIFYCOLLECTION
- CREATEALIAS
- DELETEALIAS
- LISTALIASES
- CLUSTERPROP
- ADDROLE
- REMOVEROLE
- OVERSEERSTATUS
- REQUESTSTATUS
- DELETESTATUS
- ADDREPLICAPROP
- DELETEREPLICAPROP
- BALANCESHARDUNIQUE
- REBALANCELEADERS
- FORCELEADER
- MIGRATESTATEFORMAT
- RESTORE
- DELETENODE
This list shouldn't affect how we go about fixing this bug. Just wanted to provide a definitive list for any users hitting this bug who might stumble on this and be helped by it.
was (Author: gerlowskija):
fter Varun's previous comment, I wanted to recheck the doc snippets for each of the Collection-Admin APIs, to see which have the {{success}} element, and which don't. Offering the revised list based on actually checking each API.
APIs with {{success}} element ({{isSuccess}} method is "correct" for these today)
- CREATE
- DELETE
- RELOAD
- SPLITSHARD
- CREATESHARD
- DELETESHARD
- ADDREPLICA
- DELETEREPLICA
- BACKUP
- REPLACENODE
- MOVEREPLICA
- MIGRATE
APIs without {{success}} element ({{isSuccess}} method incorrect for these today)
- LIST
- MODIFYCOLLECTION
- CREATEALIAS
- DELETEALIAS
- LISTALIASES
- CLUSTERPROP
- ADDROLE
- REMOVEROLE
- OVERSEERSTATUS
- REQUESTSTATUS
- DELETESTATUS
- ADDREPLICAPROP
- DELETEREPLICAPROP
- BALANCESHARDUNIQUE
- REBALANCELEADERS
- FORCELEADER
- MIGRATESTATEFORMAT
- RESTORE
- DELETENODE
This list shouldn't affect how we go about fixing this bug. Just wanted to provide a definitive list for any users hitting this bug who might stumble on this and be helped by it.
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org