Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11526

CollectionAdminResponse.isSuccess() incorrect for most admin collections APIs

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 8.0
    • None
    • SolrJ
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gerlowskija Jason Gerlowski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: