luozihen commented on PR #12015:
URL: https://github.com/apache/seatunnel/pull/12015#issuecomment-5630162368
@SEZ9 @DanielLeens
Good news — CI is green on the latest head.
Here's the per-item status:
- **F1** — Narrowed to the multi-table sink path.
`ReadonlyConfig#toConfig()` is now byte-for-byte the
pre-PR version (unchanged); the config-reconstruction fix is scoped to
`MultiTableFailureHelper.mergeOptions()`, which merges the option maps
directly instead of going
through `toConfig()`.
- **F2 / F5** — Chose the order-preserving structure. `toCompiledPatternMap`
builds an explicit
`LinkedHashMap<Pattern, List<String>>`, so "first declared pattern wins"
is guaranteed by
construction rather than by the source map's incidental order.
`testResolveMultiTablePrimaryKeysFirstMatchWins`
covers it, and the statement in `docs/en/connectors/sink/Jdbc.md` matches
this behavior.
- **F3** — Done. `validatePrimaryKeyColumns` (called from the shared
`applyPrimaryKeys` helper)
rejects blank names and names containing a comma before they are
comma-joined into `PRIMARY_KEYS`.
Covered by `testFactoryContextWithMultiTableConfigInvalidColumnFails`.
- **F4** — The connector expands `${primary_key}` / `${unique_key}` inside
`multi_table_config.primary_keys`; the engine-level
`TablePlaceholderProcessor.replaceTablePlaceholder` only rewrites
top-level String and
single-element-String-List values, so it leaves the nested map untouched —
no double processing.
- **F6** — Done. `toCompiledPatternMap` compiles every declared pattern up
front via `compilePattern`
(memoized in a bounded LRU), so an invalid regex raises `JDBC-12`
immediately. Covered by
`testResolveMultiTablePrimaryKeysInvalidRegexFails` and
`testCompilePatternInvalidFails`.
- **F7** — Partial, as agreed.
`ReadableConfigTest#testToConfigPreservesDottedKeyExpansion` is the
regression test for the old `toConfig()` dotted-key behavior. The
engine-level IT/E2E is deferred
and noted as a follow-up in the PR description.
- **F8** — Done. The key is now `multi_table_config` (snake_case)
consistently across code, error
strings, unit tests, and EN/ZH docs.
On the cache sizing: the keys are table-name regexes, so a busy multi-tenant
deployment typically
configures on the order of tens of distinct patterns (a few table families);
256 sits comfortably
above that.
Thanks again!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]