You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/12/30 07:48:23 UTC

[GitHub] [solr] ijioio edited a comment on pull request #479: SOLR-15842: Fix async backup response

ijioio edited a comment on pull request #479:
URL: https://github.com/apache/solr/pull/479#issuecomment-1002910206


   It is maybe seems a bit strange to hold two values `Response` and `response`, but I made it for two reasons:
   
   - I don't think that messing with the original `Response` value is a good idea. It is a general response format used for all the core admin operations. So there may be a chance of someone depending on its content/format.
   - In case we use some field other than `response` we also need to update the function `aggregateResults` to support two types of response formats for aggregation. In contrast, if we use the `response` field it will be compatible with current`aggregateResults` code.
   
   This is how response for status request will looks like in case of adding `response` field:
   
   ```json
   {
       "responseHeader": {
           "status": 0,
           "QTime": 19
       },
       "success": {
           "localhost:8983_solr": {
               "responseHeader": {
                   "status": 0,
                   "QTime": 4
               }
           },
           "localhost:8983_solr": {
               "responseHeader": {
                   "status": 0,
                   "QTime": 8
               }
           },
           "localhost:8983_solr": {
               "responseHeader": {
                   "status": 0,
                   "QTime": 0
               },
               "STATUS": "completed",
               "Response": "TaskId: 10562744829711078047 webapp=null path=/admin/cores params={core=techproducts_shard2_replica_n4&async=10562744829711078047&qt=/admin/cores&name=shard2&shardBackupId=md_shard2_1&action=BACKUPCORE&location=file:///users/rh/solr-8.11.1/backuppp/myBackupName/techproducts/&incremental=true&prevShardBackupId=md_shard2_0&wt=javabin&version=2} status=0 QTime=4",
               "response": [
                   "startTime",
                   "2021-12-30T06:45:55.978702Z",
                   "indexFileCount",
                   1,
                   "uploadedIndexFileCount",
                   0,
                   "indexSizeMB",
                   0.001,
                   "uploadedIndexFileMB",
                   0.001,
                   "shard",
                   "shard2",
                   "endTime",
                   "2021-12-30T06:45:55.995335Z",
                   "shardBackupId",
                   "md_shard2_1"
               ]
           },
           "localhost:8983_solr": {
               "responseHeader": {
                   "status": 0,
                   "QTime": 0
               },
               "STATUS": "completed",
               "Response": "TaskId: 10562744829713680734 webapp=null path=/admin/cores params={core=techproducts_shard1_replica_n1&async=10562744829713680734&qt=/admin/cores&name=shard1&shardBackupId=md_shard1_1&action=BACKUPCORE&location=file:///users/rh/solr-8.11.1/backuppp/myBackupName/techproducts/&incremental=true&prevShardBackupId=md_shard1_0&wt=javabin&version=2} status=0 QTime=8",
               "response": [
                   "startTime",
                   "2021-12-30T06:46:10.266750Z",
                   "indexFileCount",
                   21,
                   "uploadedIndexFileCount",
                   21,
                   "indexSizeMB",
                   0.006,
                   "uploadedIndexFileMB",
                   0.006,
                   "shard",
                   "shard1",
                   "endTime",
                   "2021-12-30T06:46:10.438942Z",
                   "shardBackupId",
                   "md_shard1_1"
               ]
           }
       },
       "10562744829711078047": {
           "responseHeader": {
               "status": 0,
               "QTime": 0
           },
           "STATUS": "completed",
           "Response": "TaskId: 10562744829711078047 webapp=null path=/admin/cores params={core=techproducts_shard2_replica_n4&async=10562744829711078047&qt=/admin/cores&name=shard2&shardBackupId=md_shard2_1&action=BACKUPCORE&location=file:///users/rh/solr-8.11.1/backuppp/myBackupName/techproducts/&incremental=true&prevShardBackupId=md_shard2_0&wt=javabin&version=2} status=0 QTime=4",
           "response": [
               "startTime",
               "2021-12-30T06:45:55.978702Z",
               "indexFileCount",
               1,
               "uploadedIndexFileCount",
               0,
               "indexSizeMB",
               0.001,
               "uploadedIndexFileMB",
               0.001,
               "shard",
               "shard2",
               "endTime",
               "2021-12-30T06:45:55.995335Z",
               "shardBackupId",
               "md_shard2_1"
           ]
       },
       "10562744829713680734": {
           "responseHeader": {
               "status": 0,
               "QTime": 0
           },
           "STATUS": "completed",
           "Response": "TaskId: 10562744829713680734 webapp=null path=/admin/cores params={core=techproducts_shard1_replica_n1&async=10562744829713680734&qt=/admin/cores&name=shard1&shardBackupId=md_shard1_1&action=BACKUPCORE&location=file:///users/rh/solr-8.11.1/backuppp/myBackupName/techproducts/&incremental=true&prevShardBackupId=md_shard1_0&wt=javabin&version=2} status=0 QTime=8",
           "response": [
               "startTime",
               "2021-12-30T06:46:10.266750Z",
               "indexFileCount",
               21,
               "uploadedIndexFileCount",
               21,
               "indexSizeMB",
               0.006,
               "uploadedIndexFileMB",
               0.006,
               "shard",
               "shard1",
               "endTime",
               "2021-12-30T06:46:10.438942Z",
               "shardBackupId",
               "md_shard1_1"
           ]
       },
       "response": [
           "collection",
           "techproducts",
           "numShards",
           2,
           "backupId",
           1,
           "indexVersion",
           "9.0.0",
           "startTime",
           "2021-12-30T06:45:35.738064Z",
           "indexSizeMB",
           0.007
       ],
       "status": {
           "state": "completed",
           "msg": "found [1056] in completed tasks"
       }
   }
   ```
   
   Another way to solve the problem, is to put results of the operation to the `toLog` list of the response. But this implies parsing the generated string located in the `Response` field and extracting all the required fields from it within the `aggregateResults` method. Looks unnecessary complex.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org