[DocDB] If restore_snapshot doesn't have any snapshot to restore, it should give meaningful message instead of giving restoration uuid
#13 437 ouverte le 26 juil. 2022
Métriques du dépôt
- Stars
- (8 229 stars)
- Métriques de merge PR
- (Merge moyen 17j 21h) (92 PRs mergées en 30 j)
Description
Jira Link: DB-3058
Description
Let’s say you create snapshot schedule and it is taking snapshots at every interval of t1.
timestamp1 ------> timestamp2 ------> timestamp3 ..............
interval between timestamp1 and timestamp2 is t1
Let's say there was deletion of some table at a 'time' which is greater than timestamp3. The latest snapshot available is at timestamp3 (as timestamp4 is not yet reached)
If we try to restore to a point by giving it to restore to a point 'time' either by absolute of relative, it doesn't have snapshot to restore to that particular point. Latest available would be timestamp3.
Observation:
Restoration UUID is seen in response. And if we try to see the status of restoration UUID, it says RESTORED.
Suggestion:
Since no snapshot was taken and it is not restored to that particular point, it is better to show a better message saying:
Last snapshot available is at with <snapshot_id>.
Reason:
It gives a false info saying it is restored, but the state is as it is. Hence a better user experience can be targeted to achieve.