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 aperta il 26 lug 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (1 assegnatario)C (1003 fork)batch import
area/docdbgood first issuekind/enhancementpriority/medium

Metriche repository

Star
 (8229 star)
Metriche merge PR
 (Merge medio 17g 21h) (92 PR mergiate in 30 g)

Descrizione

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.

Guida contributor