Retroactively time partition an existing table#5650
Retroactively time partition an existing table#5650dorinhogea merged 1 commit intobloomberg:mainfrom
Conversation
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Error. ⚠.
Cbuild submission: Error ⚠.
Regression testing: 551/639 tests failed ⚠.
The first 10 failing tests are:
sc_constraints [core dumped]
scindex [core dumped]
sc_inserts_deletes_partial_index_off_generated [core dumped]
sc_inserts_deletes [core dumped]
sc_redo [core dumped]
sc_partial_datacopy [core dumped]
sc_datacopy [core dumped]
sc_blob_update [core dumped]
sc_versmismatch
sc_inserts
e2b08d0 to
c476d4a
Compare
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Error. ⚠.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated
sc_resume
insert_lots_ssl_generated
insert_lots
scindex
sc_constraints
sc_inserts_deletes_partial_index_off_generated
sc_inserts_deletes
sc_fieldlarger
sc_repeated_updates
c476d4a to
8ff1434
Compare
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Error. ⚠.
Cbuild submission: Success ✓.
Regression testing: 579/639 tests failed ⚠.
The first 10 failing tests are:
truncatesc_offline_generated [core dumped]
logfill_logput_window_generated
scindex
sc_constraints
sc_inserts_deletes_partial_index_off_generated
sc_inserts_deletes
sc_resume_logicalsc_generated
sc_resume
sc_fieldlarger
sc_repeated_updates
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Error. ⚠.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
comdb2sys_queueodh_generated
comdb2sys_pagesize_generated
comdb2sys
consumer_non_atomic_default_consumer_generated
auth_twofiles_generated
auth_queueodh_generated
auth
sc_transactional_rowlocks_generated
truncatesc_offline_generated
insert_lots_ssl_generated
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Error. ⚠.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
logfill_logput_window_generated
sc_timepart
consumer_non_atomic_default_consumer_generated
sc_transactional_rowlocks_generated
truncatesc_offline_generated
insert_lots_ssl_generated
insert_lots
reco-ddlk-sql
ALTER TABLE <table> PARTITIONED BY TIME PERIOD <p> RETENTION <r> START <s> RETROACTIVELY The command will partition <table into a time partition and distribute existing data from into proper shards. It will create <r> shards, going back into the past starting from <s>. It will use the timestamp embedded in the genid to distribute the row into a proper shard. Comments: - rows older than the oldest shard are moved into the latter - rows newer than the are moved into the current shard - if is in the past, it is possible that the server will rollout the new time partition into present and in the process wipe some data out; there is an option to disable rollout - to preserve existing data until rollout, use the value of start <s> should be o the next rollout in the future Signed-off-by: Dorin Hogea <dhogea@bloomberg.net>
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Error. ⚠.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated
truncatesc_offline_generated
insert_lots_ssl_generated
insert_lots
reco-ddlk-sql
roborivers
left a comment
There was a problem hiding this comment.
Coding style check: Success ✓.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
maxtable [core dumped]
consumer_non_atomic_default_consumer_generated
insert_lots_ssl_generated
insert_lots
reco-ddlk-sql
|
@markhannum thank you! |
New syntax:
ALTER TABLE <table> PARTITIONED BY TIME PEROD <period> RETENTION <retention> START <start> RETROACTIVELY
The command will partition <table> into a time partition and distribute existing data from <table> into proper shards.
It will create <retention> shards, going back into the past starting from <start>.
It will use the timestamp embedded in the genid to distribute the row into a proper shard.
Comments: