system_keyspace: add cleanup_candidate to CDC_GENERATIONS_V3
In the following commits, we implement a garbage collection for CDC_GENERATIONS_V3. The first step is introducing the clean-up candidate. It will be continually updated by the CDC generation publisher and used to remove obsolete data.
This commit is contained in:
@@ -281,6 +281,11 @@ schema_ptr system_keyspace::cdc_generations_v3() {
|
||||
* range when the generation was first created. Together with the set of streams above it fully
|
||||
* describes the mapping for this particular range. */
|
||||
.with_column("ignore_msb", byte_type)
|
||||
/* The identifier and timestamp of the current clean-up candidate - the next generation to be
|
||||
* removed. If set, the candidate will be removed together with all older generations when it
|
||||
* becomes obsolete. Otherwise, the next published CDC generation will become a new candidate.
|
||||
* This process prevents the CDC generation data from endlessly growing. */
|
||||
.with_column("cleanup_candidate", cdc_generation_ts_id_type, column_kind::static_column)
|
||||
.with_version(system_keyspace::generate_schema_version(id))
|
||||
.build();
|
||||
}();
|
||||
|
||||
Reference in New Issue
Block a user