Skip to content

oracledb_cdc: enable prefetch_rows via config - #4698

Draft
josephwoodward wants to merge 2 commits into
mainfrom
jw/oracledb_prefetchrows
Draft

oracledb_cdc: enable prefetch_rows via config#4698
josephwoodward wants to merge 2 commits into
mainfrom
jw/oracledb_prefetchrows

Conversation

@josephwoodward

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread internal/impl/oracledb/input_oracledb_cdc.go
@josephwoodward
josephwoodward force-pushed the jw/oracledb_prefetchrows branch from efa5e58 to 5c9f27a Compare August 13, 2026 15:32
Comment thread internal/impl/oracledb/input_oracledb_cdc.go
Description("The number of rows Oracle fetches per network round-trip, for both snapshot and streaming reads. This value is passed straight through to the underlying Oracle connection, which otherwise auto-tunes it based on row width. For narrow rows the resulting value can still be small enough that round-trip latency, rather than throughput, ends up limiting read speed — raising this trades some memory per fetch for fewer round-trips.").
ShortDescription("Rows fetched per network round-trip from Oracle; raising this can reduce round-trip-bound read latency for narrow rows.").
Example(1000).
LintRule(`root = if this <= 0 { [ "` + ociFieldPrefetchRows + ` must be greater than 0" ] }`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LintRule (added by the second commit, "oracledb_cdc: add linter for prefetch_rows") has no test covering it.

ConfigSpec.ParseYAML does not evaluate field lint rules, so TestParsePrefetchRowsConfig only exercises the runtime prefetchRows <= 0 check in parsePrefetchRowsConfig — see config_test.go#L262-L272, where require.NoError(t, err) on ParseYAML for prefetch_rows: 0 confirms the lint never runs there. A typo'd or otherwise ineffective lint rule would therefore land green.

The project test patterns cover this case with a config-linter test (service.NewEnvironment().NewComponentConfigLinter() + LintInputYAML, per the "Config Linting" pattern in CLAUDE.md → tester agent). Suggest adding a small table asserting that prefetch_rows: 0 yields the expected prefetch_rows must be greater than 0 lint and that a valid value yields none.

Ref: input_oracledb_cdc.go#L118-L124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant