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

Standardize response codes and success/failure determination for core-admin api calls

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4, 8.0
    • Component/s: None
    • Labels:
      None

      Description

      If we were to tackle SOLR-11526 I think we need to start fixing the core admin api's first.

      If we are relying on response codes I think we should make the following change and fix all the APIs

        interface CoreAdminOp {
          void execute(CallInfo it) throws Exception;
        }
      

      To

        interface CoreAdminOp {
          /**
           *
           * @param it request/response object
           *
           * If the request is invalid throw a SolrException with SolrException.ErrorCode.BAD_REQUEST ( 400 )
           * If the execution of the command fails throw a SolrException with SolrException.ErrorCode.SERVER_ERROR ( 500 )
           * Add a "error-message" key to the response object with the exception ( this part should be done at the caller of this method so that each operation doesn't need to do the same thing )
           */
          void execute(CallInfo it);
        }
      

      cc Jason Gerlowski

        Attachments

        1. SOLR-11551.patch
          52 kB
          Jason Gerlowski
        2. SOLR-11551.patch
          51 kB
          Jason Gerlowski
        3. SOLR-11551.patch
          99 kB
          Steven Rowe
        4. SOLR-11551.patch
          100 kB
          Jason Gerlowski

          Issue Links

            Activity

              People

              • Assignee:
                gerlowskija Jason Gerlowski
                Reporter:
                varun Varun Thacker
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: