Commit 2f2800e
Merge #159276
159276: schemachanger: support metadata-only TTL parameters and ttl_job_cron r=rafiss a=rafiss
See individual commits.
### schemachanger: handle basic TTL params
The builder was updated so that it modifies the scpb.RowLevelTTL element
for when handling TTL storage params. This is needed so that we can do
proper validation on the TTL params, since the validation logic checks
dependencies between different parameters.
The UpsertRowLevelTTL immediate mutation takes care of modifying the
descriptor. Logic was also needed to avoid dropping the TTL schedule if
we are modifying parameters.
### schemachanger: support ttl_job_cron parameter in declarative schema changer
Previously, modifying the ttl_job_cron storage parameter required falling
back to the legacy schema changer because the declarative schema changer
had no mechanism to update the TTL scheduled job's cron expression.
This commit adds support for ttl_job_cron by:
1. Adding UpdateTTLScheduleCron as a new deferred mutation operation that
updates the cron expression on the existing TTL scheduled job.
2. Implementing findOldTTLCron in opgen to detect when the cron expression
has changed by comparing the new RowLevelTTL element against the one
being dropped, emitting UpdateTTLScheduleCron only when necessary.
3. Adding UpdateTTLScheduleCron to metadataUpdater which loads the
scheduled job, updates its cron expression, and persists the change.
informs: #122379
Release note: None
Co-authored-by: Rafi Shamim <[email protected]>File tree
31 files changed
+562
-175
lines changed- pkg/sql
- descmetadata
- schemachanger
- scbuild/internal/scbuildstmt
- scdecomp
- scdeps/sctestdeps
- scexec
- scmutationexec
- scop
- scpb
- uml
- scplan
- internal
- opgen
- rules/current
- testdata
- testdata
- screl
- sctest
- storageparam
- tablestorageparam
31 files changed
+562
-175
lines changedThis file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | 771 | | |
779 | 772 | | |
780 | 773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1431 | 1431 | | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | | - | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | 1434 | | |
1442 | 1435 | | |
1443 | 1436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
0 commit comments