undo_retention specifies the time range in seconds of data versions to be retained by the system. This parameter is used to control the collection of data of multiple versions in minor compactions.
| Parameter | Description |
|---|---|
| Type | Integer |
| Default value | 1800 |
| Value range | [0, 4294967295] |
| Effective upon restart of OBServer node | No |
OceanBase Database retains historical data rows of multiple versions for minor compaction data. You can set undo_retention to control the range of data versions retained in the minor compaction.
When you use this parameter, note that:
When
undo_retentionis set to0, multi-version minor compaction is disabled, indicating that only the latest version of row data is retained in the minor compaction file.When
undo_retentionis set to a value greater than0, multi-version minor compaction is enabled, and multiple versions of row data within the specified period in seconds are retained in the minor compaction file.Notice
After multi-version minor compaction is enabled for the tenant, the corresponding incremental minor compaction files are retained in a major compaction, but multi-version data is not stored in the Major SSTable. To prevent the number of retained SSTable files from exceeding the limit, we recommend that you do not set this parameter to an excessively large value.