Skip to content

Change retention of a truncate time partition - #6113

Open
dorinhogea wants to merge 1 commit into
bloomberg:mainfrom
dorinhogea:partretention
Open

Change retention of a truncate time partition#6113
dorinhogea wants to merge 1 commit into
bloomberg:mainfrom
dorinhogea:partretention

Conversation

@dorinhogea

Copy link
Copy Markdown
Contributor

New syntx:
ALTER TABLE PARTITIONED BY TIME|MANUAL RETENTION
It resizes a truncate partition's shard count without recreating the partition:

  • increasing preserves all existing data,
  • decreasing discards the oldest data down to the new retention.
    Legacy add&drop partitions still use PUT TIME PARTITION ... RETENTION; using PUT on a truncate partition, or ALTER on a legacy partition, is rejected.

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
triggersc_latency
timepart_retention_alter
consumer_non_atomic_default_consumer_generated **quarantined**
builtin_ruleset
sc_downgrade [timeout] **quarantined**

ALTER TABLE <name> PARTITIONED BY TIME|MANUAL RETENTION <n> resizes a
truncate partition's shard count without recreating the partition:
increasing preserves all existing data, decreasing discards the oldest
data down to the new retention. Legacy add&drop partitions still use
PUT TIME PARTITION ... RETENTION; using PUT on a truncate partition, or
ALTER on a legacy partition, is rejected.

Signed-off-by: Dorin Hogea <dhogea@bloomberg.net>

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
timepart_retention_alter
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
phys_rep_tiered [timeout]
phys_rep_tiered_nosource_generated [timeout]
phys_rep_tiered_firstfile_generated [timeout]
reco-ddlk-sql [timeout] **quarantined**

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
cdb2api_rollback_rc [failed with core dumped]
cdb2jdbc
timepart_retention_alter
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants