yugabyte/yugabyte-db

[DocDB] If restore_snapshot doesn't have any snapshot to restore, it should give meaningful message instead of giving restoration uuid

Open

#13,437 opened on Jul 26, 2022

View on GitHub
 (1 comment) (0 reactions) (1 assignee)C (1,003 forks)batch import
area/docdbgood first issuekind/enhancementpriority/medium

Repository metrics

Stars
 (8,229 stars)
PR merge metrics
 (Avg merge 17d 21h) (92 merged PRs in 30d)

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.

Contributor guide