# Default TiCDC New Kernel

## Analysis

| Area | Current behavior | Target behavior | Verification |
|---|---|---|---|
| New kernel selection | TiCDC new kernel is enabled only when `ticdc-new-kernel-allowlist` matches and `ticdc-new-kernel-blacklist` does not match. | TiCDC new kernel is enabled by default after the compatible TiDB version gate. `ticdc-new-kernel-blacklist` opts a tenant, project, or cluster back to the old kernel. | `go test ./app/models/ticdc/impl -run TestClusterModelRegionalImplTestSuite/TestIsNewKernelEnabled -count=1` |
| Create TiCDC cluster | New kernel create path patches `newarch = true`; old kernel path is used when allowlist misses. | New kernel create path is the default; old kernel path is used when blacklist matches or TiDB version is too old. | `go test ./app/models/ticdc/impl -run TestClusterModelRegionalImplTestSuite/TestDoCreate -count=1` |
| Documentation | CDC feature gate table describes an allowlist and blacklist pair. | Documentation states that the blacklist disables the default new kernel path. | Review `.domain-knowledge/cdc-architecture.md` diff. |

Symbols to keep:

- `TiCDCNewKernelAllowlist`: keep the constant for configuration compatibility, but it is no longer consulted by the TiCDC new kernel decision.
- `TiCDCNewKernelBlacklist`: reuse as the opt-out list for old kernel fallback.

## Execution Steps

1. Update `clusterModelRegionalImpl.isNewKernelEnabled` to return true by default after the compatible TiDB version gate unless `ticdc-new-kernel-blacklist` matches.
   - Verification: targeted unit test for `TestIsNewKernelEnabled` passes.
   - Success criteria: not-in-blacklist returns true, in-blacklist returns false, migration override remains true, old TiDB versions remain false.

2. Update TiCDC regional model tests to remove allowlist expectations and cover the new default behavior.
   - Verification: targeted unit test for `TestDoCreate` passes.
   - Success criteria: default create path uses new kernel; blacklist create path uses old kernel.

3. Update CDC domain knowledge for the revised rollout mechanism.
   - Verification: inspect diff.
   - Success criteria: docs no longer describe allowlist as required for new kernel enablement.

4. Run focused tests, then broader package tests if focused tests pass.
   - Commands:
     - `go test ./app/models/ticdc/impl -run TestClusterModelRegionalImplTestSuite/TestIsNewKernelEnabled -count=1`
     - `go test ./app/models/ticdc/impl -run TestClusterModelRegionalImplTestSuite/TestDoCreate -count=1`
     - `go test ./app/models/ticdc/impl -count=1`
   - Success criteria: all commands exit 0.

## Risk Assessment

- The behavior change affects new TiCDC cluster creation and UI feature discovery for new changefeeds because both call `isNewKernelEnabled`.
- Existing TiCDC clusters keep their stored `IsNewKernel` value; scale and existing-version paths continue to respect persisted state.
- Production config must use `featuresSwitchersConfig.featuresAllowList.ticdc-new-kernel-blacklist` to opt out specific tenants, projects, or clusters.
