Table lifecycle: skip time hint for unspecified states #7151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
NO
Status
READY
Description
Table GC uses table names as hints. For example:
_vt_HOLD_3ace8bcef73211ea87e9f875a4d24e90_20200915120412
says to hold the table until2020-09-15 12:04:12
.Background reading: https://vitess.io/docs/reference/features/table-lifecycle/
With this PR, the "timestamp" suggestion is ignored if the
state
is not in the set of predefined GC states. e.g. if the table is_vt_HOLD_3ace8bcef73211ea87e9f875a4d24e90_20211201000000
but-table_gc_lifecycle="purge,evac,drop"
, thenhold
is not a lifecycle state, and so there's no point in waiting out until2021-12-01 00:00:00
, we just transition the table to the next specified state (purge
in our example)Related Issue(s)
Tracking: #6689
Todos
Deployment Notes
Impacted Areas in Vitess
List general components of the application that this PR will affect:
?