matrixorigin / matrixorigin/matrixone
[Bug]: CREATE CDC rejects the documented 100ms and 200ms Frequency values
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
# Summary
`CREATE CDC` rejects the millisecond `Frequency` values documented by the CDC user guide.
The guide lists `Frequency` with a default of `200ms` and provides a `100ms` high-frequency example. Current `main` rejects both values with `invalid frequency`.
## Version
- MatrixOne `main`: `820ee12144439c5b63c03b261f4330ec0364fdb3`
- Isolated two-CN MatrixOne deployment
- Three independent reproductions
## Reproduction
Create a valid source database/table, matching target database/table, and the required source PITR. Then create a table-level CDC task with a documented millisecond frequency:
```sql
CREATE CDC cdc_frequency_100ms
''
'matrixone'
''
'source_db.t:target_db.t'
{'Level'='table', 'NoFull'='true', 'Frequency'='100ms'};
```
The same result occurs with `Frequency='200ms'`.
## Actual result
Both documented values are rejected:
```text
internal error: invalid frequency: 100ms
internal error: invalid frequency: 200ms
```
As a control, the otherwise identical task with `Frequency='1m'` is accepted and can be dropped normally.
## Expected result
Either:
1. `100ms` and `200ms` should be accepted, matching the public CDC guide's default and example; or
2. the guide should state the actual accepted format (positive whole minutes or hours) and use a valid default/example.
## Source/documentation mismatch
The CDC user guide documents:
- `Frequency` default: `200ms`
- high-frequency example: `{'Frequency'='100ms'}`
The current validation in `pkg/frontend/cdc_util.go` accepts only positive integer values ending in `m` or `h`, so neither documented millisecond value can pass validation.
## Reproduction evidence
The following result was identical in three fresh runs:
```text
Frequency='100ms' -> rejected: invalid frequency: 100ms
Frequency='200ms' -> rejected: invalid frequency: 200ms
Frequency='1m' -> accepted
```
Contributor guide
Assessment
This issue has not been assessed yet.