ijioio edited a comment on pull request #595:
URL: https://github.com/apache/solr/pull/595#issuecomment-1034127420
@cpoerschke @HoustonPutman
> Maybe we should investigate this is it safe to provide copyIndexFiles with
backupManager and backupProps?
I've updated signature of `copyIndexFiles` method for non incremental
(snapshot) backup to accept `backupManager` and `backupProperties`. In turn, it
will pass them both to `aggregateResults`. This way `aggregateResults` will
always get non null `backupManager` and `backupProperties` values, so it will
be safe to extract necessary data from it. First of all we will get `startTime`
(before it was `null` for snapshot backups).
Second, let's compare shard responses of incremental and snapshot backups:
Incremental:
```json
"response": {
"startTime": "2022-02-04T12:35:52.304582700Z",
"indexFileCount": 21,
"uploadedIndexFileCount": 21,
"indexSizeMB": 0.006,
"uploadedIndexFileMB": 0.006,
"shard": "shard1",
"endTime": "2022-02-04T12:35:52.348963900Z",
"shardBackupId": "md_shard1_0"
}
```
Snapshot:
```json
"response": {
"startTime": "Wed Feb 09 07:25:51 UTC 2022",
"fileCount": 21,
"status": "success",
"snapshotCompletedAt": "Wed Feb 09 07:25:51 UTC 2022",
"snapshotName": "shard1",
"directoryName": "snapshot.shard1"
}
```
They are not equal, but have something in common. We can aggregate results
from both of them. For example, we can unify `indexFileCount` and
`uploadedIndexFileCount` of incremental backup and `fileCount` of snapshot
backup. Since snapshot is not incremental by its nature, we can fill both
`indexFileCount` and `uploadedIndexFileCount` of aggregated result with
`fileCount` value.
Here is an example of aggregated results of the snapshot backup response
(before and after changes applied):
Before:
```json
"response": {
"collection": "techproducts",
"numShards": 2,
"endTime": "2022-02-09T07:25:52.879269500Z"
}
```
After:
```json
"response": {
"collection": "techproducts",
"numShards": 2,
"backupId": -1,
"indexVersion": "9.0.0",
"startTime": "2022-02-09T19:16:10.082015800Z",
"indexFileCount": 22,
"uploadedIndexFileCount": 22,
"endTime": "2022-02-09T19:16:11.191537400Z"
}
```
Note that for snapshot backups value of `backupId` will be always `-1`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]