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

When backup fails unexpected json schema is returned

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 9.4
    • main (10.0), 9.6
    • Backup/Restore
    • None

    Description

      After triggering backup with

      curl 'localhost:8983/solr/core/replication?command=backup&repository=gcs_backup'

      I can watch its result with

       

      curl 'http://localhost:8983/solr/core/replication?command=details'

      Which returns this json:

       

      {
          "responseHeader": {
              "status": 0,
              "QTime": 3
          },
          "status": "OK",
          "details": {
              // redacted
              "backup": {
                  "startTime": "2023-12-20T14:51:06.388847Z",
                  "fileCount": 594,
                  "indexFileCount": 594,
                  "status": "success",
                  "snapshotCompletedAt": "2023-12-20T17:14:32.257828Z",
                  "endTime": "2023-12-20T17:14:32.257828Z",
                  "snapshotName": "name",
                  "directoryName": "dir"
              }
          }
      }
      

      Notice that backup is an object. However when exception occurs this json is returned:

      {
          "responseHeader":{
            "status":0,
            "QTime":1
          },
          "status":"OK",
          "details":{
            //redacted
            "backup":["exception","The specified bucket does not exist."]
          }
        }
      

      Notice that backup is no longer an object. It became an array. I believe it was supposed to be an object as first element is key name ("exception").
      I believe bug is in this line:
      https://github.com/apache/solr/blob/91a19404fc90929b70c8513a058cfb1d560496da/solr/core/src/java/org/apache/solr/handler/SnapShooter.java#L258-L259

      Attachments

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              pciezkowski Przemyslaw Ciezkowski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h