Repository navigation
[refactor](changelog) Rename row binlog to changelog and split it from CCR binlog - #69311
Merged
Merged
Conversation
morningman
requested review from
924060929,
CalvinKirs,
airborne12,
csun5285,
dataroaring,
deardeng,
eldenmoon,
englefly,
gavinchou,
liaoxin01,
luwei16,
morrySnow,
mymeiyi,
starocean999,
wyxxxcat,
yiguolei and
yujun777
as code owners
October 20, 2026 02:34
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
1 similar comment
Contributor
Author
|
run buildall |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
TPC-H: Total hot run time: 28710 ms |
Contributor
TPC-DS: Total hot run time: 150927 ms |
Contributor
ClickBench: Total hot run time: 24.42 s |
morningman
force-pushed
the
changelog-t1-rename
branch
from
October 20, 2026 14:00
8b6c36c to
09d2900
Compare
Contributor
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 28696 ms |
Contributor
TPC-DS: Total hot run time: 150482 ms |
Contributor
TPC-H: Total hot run time: 28642 ms |
Contributor
TPC-DS: Total hot run time: 151086 ms |
Contributor
ClickBench: Total hot run time: 25.16 s |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
gavinchou
approved these changes
Oct 21, 2026
924060929
approved these changes
Oct 21, 2026
yiguolei
approved these changes
Oct 21, 2026
CalvinKirs
approved these changes
Oct 21, 2026
morrySnow
approved these changes
Oct 21, 2026
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
PR approved by at least one committer and no changes requested. |
This was referenced Oct 21, 2026
Closed
16 tasks
hello-stephen
pushed a commit
that referenced
this pull request
Oct 21, 2026
Related PR: #69311, #69268, #63639 Problem Summary: #69311 renamed the row binlog (the change stream IVM reads) to **changelog** and rejected the legacy keys `binlog.format` / `binlog.need_historical_value` in every DDL. Two test files merged just before it fell outside that rename sweep and now fail: 1. `regression-test/suites/mtmv_p0/ivm/test_ivm_datetime_sequence.groovy` (from #69268) — creates its IVM base tables with `"binlog.enable" = "true", "binlog.format" = "ROW", "binlog.need_historical_value" = "true"`, which CREATE TABLE now rejects. 2. `RelationImpliedPredicateTest#testIvmOutputPredicatesSkipHiddenColumns` (from #63639) — same legacy properties in the base-table DDL, and it gates the creation on `enable_feature_binlog` instead of the new `enable_feature_changelog`. Fix: switch both to `"changelog.enable" = "true"` (plus `"changelog.need_historical_value" = "true"` where the before-image is needed), drop the rejected `binlog.format`, and use `enable_feature_changelog` as the feature gate in the FE unit test. Related IVM trace issue: #65418 .
morningman
added a commit
to apache/doris-flink-connector
that referenced
this pull request
Oct 21, 2026
…710) Doris renamed the unreleased row binlog feature, which the incremental source reads, to changelog (apache/doris#69311). A table now enables it with "changelog.enable" = "true" instead of "binlog.enable" = "true" plus "binlog.format" = "ROW", Doris rejects the old binlog.format and binlog.need_historical_value properties, and the hidden columns are now __DORIS_CHANGELOG_TSO__, __DORIS_CHANGELOG_LSN__ and __DORIS_CHANGELOG_OP__. The @incr syntax, the increment types, information_schema.tso_status and error code 5101 are unchanged. The source still selected and ordered by the __DORIS_BINLOG_*__ columns, so it could not read Doris master after that rename. Query and read the new hidden columns, and rename the connector's own row binlog names to changelog so they match the Doris feature: - source.binlog.increment-type -> source.changelog.increment-type - source.binlog.poll-interval -> source.changelog.poll-interval - source.binlog.visible-wait-timeout -> source.changelog.visible-wait-timeout - source.binlog.offset-table -> source.changelog.offset-table - source.binlog.consumer-id -> source.changelog.consumer-id - DorisConfigOptions.SOURCE_BINLOG_* -> SOURCE_CHANGELOG_* - ConfigurationOptions.SOURCE_BINLOG_VISIBLE_WAIT_TIMEOUT_MS_DEFAULT -> SOURCE_CHANGELOG_VISIBLE_WAIT_TIMEOUT_MS_DEFAULT - DorisBinlogIncrementType -> DorisChangelogIncrementType - DorisReadOptions getBinlog*() and Builder.setBinlog*() -> getChangelog*() and setChangelog*() - DorisSourceRecord getBinlogTso/Lsn/Op() -> getChangelogTso/Lsn/Op() This is a hard rename without deprecated keys: a Flink table that still sets a source.binlog.* option fails option validation as an unsupported option. Those keys only ever worked against Doris master builds from before the rename, and the connector no longer reads such builds. The integration and end-to-end fixtures create their tables with "changelog.enable" and "changelog.need_historical_value". MySQL binlog, Flink CDC and Debezium code is unchanged, and so are the split and checkpoint formats. Co-authored-by: morningman <moringman@apache.org> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
morningman
added a commit
to apache/doris-website
that referenced
this pull request
Oct 21, 2026
## Summary Rename the experimental row binlog to **changelog** in the English and Chinese docs, following apache/doris#69311. Three pages move to new URLs (old URLs redirect in every locale), every page that mentions the feature uses the new property names, table function, hidden columns, error messages and switch, and the changelog page now describes the behavior #69311 introduced. ## Why apache/doris#69311 renamed row binlog (`"binlog.enable" = "true"` + `"binlog.format" = "ROW"`, the change stream that Table Stream and incremental materialized views read) to changelog and split it from CCR binlog. It is a hard cut on an unreleased feature, so the docs on master describe names that no longer exist: | Before | After | |---|---| | `"binlog.enable" = "true"` + `"binlog.format" = "ROW"` | `"changelog.enable" = "true"` | | `binlog.ttl_seconds` (ROW tables), `binlog.need_historical_value` | `changelog.ttl_seconds`, `changelog.need_historical_value` | | `binlog(...)` table function | `changelog(...)` | | `__DORIS_BINLOG_{TSO,LSN,OP}__`, `__BEFORE__<col>__` | `__DORIS_CHANGELOG_{TSO,LSN,OP}__`, `__DORIS_CHANGELOG_BEFORE_<col>__` | | `enable_feature_binlog` (FE, BE) for row binlog and TSO | `enable_feature_changelog`; `enable_feature_binlog` is CCR only | CCR binlog, `SHOW PROC '/binlog'`, MySQL binlog CDC, Canal binlog load and Paimon `$binlog` do not change. ## Renamed pages and redirects | Old URL | New URL | |---|---| | `/docs/dev/data-operate/incremental/row-binlog` | `/docs/dev/data-operate/incremental/changelog` | | `/docs/dev/sql-manual/sql-functions/table-valued-functions/binlog` | `/docs/dev/sql-manual/sql-functions/table-valued-functions/changelog` | | `/docs/dev/key-features/binlog-table-stream` | `/docs/dev/key-features/changelog-table-stream` | | `/docs/4.x/key-features/binlog-table-stream` | `/docs/4.x/key-features/changelog-table-stream` | The same four mappings apply under `/zh-CN`, `/ja`, `/ko` and `/ru`. The redirects are one loop over `ENABLED_LOCALES` in `buildRedirectIndex()` (`docusaurus.config.js`), next to the DOG Stack block and in the style of the hackathon redirects, so each optional locale gets them as soon as it is enabled. They are not in `config/redirects-dev.json`, which lists en and zh-CN paths only, nor in `config/redirects-4.x.json`, which `scripts/migrate-4.x/build-redirects.py` generates. Evaluating `createRedirects` from the site config gives 20 old paths with `DORIS_ENABLE_LOCALES=ja,ko,ru` and 8 with the default locales. The PR has two commits so the moves stay reviewable: the first only moves the six files (en / zh-CN, dev / 4.x), and the second rewrites them. The rewritten pages keep 36–41% of their text, so the combined diff shows them as delete + add; look at the second commit to see what changed in them. The key-features slug is now `/key-features/changelog-table-stream`. The card image keeps its name (`binlog-table-stream.jpg`): pages reference it by path, nothing pairs it with the page by file name. `sidebars.ts` points to the new doc ids; the table function moves to its alphabetical place. ## Other changes - The changelog page documents the new behavior: `changelog.enable` and `changelog.need_historical_value` can only be set by `CREATE TABLE`, `changelog.ttl_seconds` can be altered, `binlog.format` and `binlog.need_historical_value` are rejected, CCR binlog and changelog are mutually exclusive (table, database, `RECOVER TABLE`), temporary tables never have changelog, a database can make changelog the default and `SHOW CREATE TABLE` then prints `"changelog.enable" = "false"` for tables without it, views / CTAS / MTMV over `changelog()` must list and alias the `__DORIS_` columns, and `enable_feature_changelog` is needed in `fe.conf` (and `be.conf` for cleanup). A short note says the feature was called row binlog in earlier development builds and that tables created that way must be recreated. - Every quoted error message matches the FE on Doris master, for example `Changelog offset has expired according to changelog.ttl_seconds`, `INCR query requires changelog enabled on base table.`, `Base Olap table ... need to enable changelog for table stream`, `Not allowed to perform current operation on Table With changelog`. - Stale content fixed: - `binlog.format` case sensitivity (the property no longer exists); - the key-features pages enabled ROW with `ALTER TABLE ... SET ("binlog.format" = "ROW")`; changelog can only be enabled by `CREATE TABLE`; - the OP hidden column is `BIGINT`, not `TINYINT`; - the changelog page said backup / restore work as usual; the FE rejects backup and restore of tables with changelog; - the key-features pages described CCR binlog and ROW as two formats of one binlog; changelog is a separate, per-table change stream that cannot be combined with CCR binlog. The same pages also used `CREATE STREAM ... ON <table>` and `"type" = "default"` (now `ON TABLE` and `min_delta`), listed a `default` consume type (now `detail` / `append_only` / `min_delta`), and said retention waits for streams and is reported in `STALE_REASON` (it does neither). - Table Stream, incremental query, IVM, CREATE TABLE / CREATE STREAM / DROP STREAM, CREATE ASYNC MATERIALIZED VIEW, MV FAQ, TSO and FE configuration pages use the new names. CREATE TABLE lists `changelog.ttl_seconds`. - Flink Doris Connector incremental reading uses the Doris-side names and the connector's renamed options `source.changelog.{increment-type,poll-interval,visible-wait-timeout,offset-table,consumer-id}` (apache/doris-flink-connector#710); it says "Doris changelog" where Flink changelog records are also discussed. The required connector version is now 26.4.0, the release expected to carry apache/doris-flink-connector#710: 26.3.0 and earlier read the hidden columns under their old names, so they only work with Doris development builds from before the rename. - The Data Warehousing use-case page links to the new key-features URL, and the query cache decision-flow SVG says "changelog scan". ## Not changed on purpose - Japanese, Korean and Russian docs and `translations/`: the translation pipeline re-translates the edited pages and handles the moved ones. Until then their old translated files are orphaned and the moved pages show English. The ja / ko labels for `marketing.warehouse.075` still read "Binlog / Table Stream". - `src/pages/community-report/` (historical weekly reports), `scripts/last-update/`, `scripts/migrate-4.x/`. - CCR docs, `SHOW PROC '/binlog'`, MySQL binlog, Canal and Paimon content. - Raster images that still show the old name: `static/images/next/data-operate/incremental/two-layers.png` and `static/images/next/query-acceleration/ivm-workflow.jpg` ("Row Binlog"), and the key-features card `static/images/next/key-features/binlog-table-stream.jpg` (`binlog.format = ROW`, and a CCR consumer arrow). Alt texts are updated; the pictures need to be redrawn. ## Validation - Static checks on every changed doc: front matter, relative links, MDX tags, no CJK in English trees, table column counts: pass. - `scripts/check_md_links_single.py --no-external` on all added / modified en, zh-CN and 4.x docs: pass. Anchors in the touched files were checked separately; the only unresolved ones are five pre-existing anchors in zh-CN `CREATE-TABLE.md` and the MV FAQ, on lines this PR does not change. - No en / zh-CN doc, sidebar, component or config links to the old paths; the remaining mentions of the old names are the rename note, the rejected-property error messages, CCR / MySQL binlog, the redirect sources and the card image path. - `node scripts/check_move.js HEAD`, `python3 check_move.py HEAD` and `python3 check_move.py <merge-base>`: pass. - `node scripts/i18n/check-configuration.cjs --all`: pass. - `I18N_LOCALE=<ja|ko|ru> node scripts/i18n/pr-preflight.cjs --base <merge-base>` for each of the three locales: pass, 0 errors (source freshness for these locales is reported, not blocking). - `node --test` for the i18n `marketing-pages`, `doc-navigation`, `configuration`, `t04`, `inventory`, `planner`, `multi-locale`, `locale-registry` and `heading-ids` tests: pass. - `scripts/key-features/generate.js` produces the card with href `/docs/dev/key-features/changelog-table-stream`. - The edited SVG parses and renders with the new text inside its boxes. - No site build was run. --------- Co-authored-by: morningman <moringman@apache.org> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
airborne12
added a commit
to airborne12/apache-doris
that referenced
this pull request
Oct 22, 2026
### What problem does this PR solve? Issue Number: None Related PR: apache#69292 Problem Summary: CI tests this PR on top of master, which renamed row binlog to changelog (apache#69311), so the table stream test of 1be095e failed there with "Property binlog.format is no longer supported". Merge master, which applies without conflicts, so that the test can use the changelog syntax. ### Release note None ### Check List (For Author) - Test: No need to test (merge only; the next commit fixes the test and runs the tests) - Behavior changed: No - Does this need documentation: No Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
airborne12
added a commit
to airborne12/apache-doris
that referenced
this pull request
Oct 22, 2026
…ngelog syntax ### What problem does this PR solve? Issue Number: None Related PR: apache#69292 Problem Summary: BindScoreToOlapScanTest created its table stream on a table with 'binlog.enable' and 'binlog.format' and enabled Config.enable_feature_binlog. Master renamed row binlog to changelog (apache#69311) and rejects those properties, so the test failed in CI, which runs on top of master. The test now uses 'changelog.enable' and Config.enable_feature_changelog. ### Release note None ### Check List (For Author) - Test: Unit Test - On the tree merged with master: BindScoreToOlapScanTest (77 tests, including the table stream case), LogicalPlanDeepCopierTest, CTEInlineTest, SearchCteRewriteTest, PushDownVirtualColumnsIntoOlapScanTest, PushDownMatchProjectionAsVirtualColumnTest, PhysicalPlanTranslatorTest, TopNRuntimeFilterTest, LogicalOlapScanTest and SearchExpressionTest pass (169 tests). Checkstyle passes. The regression tests were not run locally after the merge, because the private cluster's BE is built from the old base; CI runs them on the merged code. - Behavior changed: No - Does this need documentation: No Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
morningman
added a commit
that referenced
this pull request
Oct 22, 2026
…angelog suites (#69374) ### What problem does this PR solve? Issue Number: None Related PR: #69311 Problem Summary: #69311 renamed row binlog to changelog. It also renamed the result tags that said binlog in the changelog suites and regenerated their .out files, except in the two suites that only run in cloud mode, test_cloud_changelog_compaction and test_cloud_changelog_publish_conflict: regenerating their .out files needs a cloud cluster running that code. Those two suites still carry nine tags that say binlog, such as qt_row_binlog_publish_conflict and order_qt_cloud_dup_binlog_compaction. This renames the nine tags in the two groovy files and the matching "-- !tag --" lines in the two .out files, the same way #69311 renamed the tags of the other changelog suites (row_binlog -> changelog, binlog_compaction -> changelog_compaction). The queries are unchanged, so no result row changes. The .out files were edited by hand, only on the nine tag lines, instead of being regenerated. ### Release note None ### Check List (For Author) - Test: No need to test. Only result tag names change; the queries and the expected rows are unchanged. The two suites return early outside cloud mode and were not run locally. - Behavior changed: No - Does this need documentation: No Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
morningman
added a commit
that referenced
this pull request
Oct 22, 2026
…ble (#69375) ### What problem does this PR solve? Issue Number: None Related PR: #69311 Problem Summary: **In short.** CCR binlog is configured by four properties: `binlog.enable`, `binlog.ttl_seconds`, `binlog.max_bytes` and `binlog.max_history_nums`. `PropertyAnalyzer.analyzeBinlogConfig`, which every DDL uses to check them, ignored any other key under `binlog.` and read `binlog.enable` with `Boolean.parseBoolean`, so a misspelled key or a value such as `"yes"` was accepted without a word. The worst case: `ALTER TABLE t SET ("binlog.enable" = "yes")` succeeds and turns off the CCR binlog of a table that had it on. This PR rejects both, the way #69311 already made the `changelog.*` properties strict. **Background.** - Every DDL path validates the binlog properties with `analyzeBinlogConfig`: CREATE DATABASE and ALTER DATABASE (`CreateDatabaseCommand` / `AlterDatabasePropertiesCommand.validate`), CREATE TABLE (`InternalCatalog.createOlapTable`) and ALTER TABLE (`ModifyTablePropertiesOp.validate`, then `SchemaChangeHandler.updateBinlogConfig`). Database properties are stored as the user wrote them. - #69311 split changelog (formerly row binlog) from CCR binlog. Its `changelog.*` properties reject unknown keys (`Unknown changelog property: <key>`) and accept only `true` / `false` for `changelog.enable`; the replaced `binlog.format` and `binlog.need_historical_value` are rejected in every DDL. The four CCR keys kept the lenient parsing. **The problem, and what it cost.** On a cluster running master before this change: | Statement | Before | |---|---| | `ALTER TABLE t SET ("binlog.enable" = "yes")`, `t` has binlog on | succeeds; `t`'s binlog is now off | | `CREATE TABLE ... ("binlog.enable" = "yes")` | the table is created with binlog off | | `ALTER TABLE t SET ("binlog.ttl_second" = "3600")` (typo) | `Nothing is changed. please check your alter stmt.` | | `CREATE TABLE ... ("binlog.ttl_second" = "3600")` | `Unknown properties: {binlog.ttl_second=3600}` | | `CREATE DATABASE d PROPERTIES ("binlog.ttl_second" = "3600")` | succeeds; the key is persisted | | `ALTER DATABASE d SET PROPERTIES ("binlog.max_byte" = "1024")` | succeeds; the key is persisted | | `ALTER DATABASE d SET PROPERTIES ("binlog.enable" = "1")` | succeeds; `"1"` is persisted and read as false | **How this PR fixes it.** - `analyzeBinlogConfig` rejects any key under `binlog.` other than the four with `Unknown binlog property: <key>`. The replaced `binlog.format` and `binlog.need_historical_value` are still checked first, so they keep their message that names the replacement. - `binlog.enable` accepts only `true` or `false`, in any case, and otherwise fails with the existing `Invalid binlog enable value: <value>`, which the old `try` / `catch` around `Boolean.parseBoolean` could never reach. - CREATE TABLE runs this check on the properties as written, where it only checked the replaced keys before. Its later call to `analyzeBinlogConfig` sees the effective binlog config (the database default merged with the table properties) that `createOlapTable` puts back over them, and by then `"yes"` has already become `"false"`. - Persisted metadata is not validated again: image load and edit log replay read binlog properties through `BinlogConfig.mergeFromProperties`, which is unchanged, so a database that already stored such a key loads as before. A database's binlog default reaches CREATE TABLE as a `BinlogConfig` object, not as properties, so it does not make CREATE TABLE fail either. **Results.** | Statement | After | |---|---| | `ALTER TABLE t SET ("binlog.enable" = "yes")` | `Invalid binlog enable value: yes`; `t` keeps its binlog setting | | `CREATE TABLE ... ("binlog.enable" = "yes")` | `Invalid binlog enable value: yes` | | `ALTER TABLE` / `CREATE TABLE` / `CREATE DATABASE` with `"binlog.ttl_second"` | `Unknown binlog property: binlog.ttl_second` | | `ALTER DATABASE ... ("binlog.max_byte" = "1024")` | `Unknown binlog property: binlog.max_byte` | | `ALTER DATABASE ... ("binlog.enable" = "1")` | `Invalid binlog enable value: 1` | | `"binlog.enable" = "TRUE"` / `"False"` | accepted, stored as `true` / `false` (unchanged) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: None
Related PR: #69238, #69240, #69242
Problem Summary:
In short. Row binlog (
binlog.format = 'ROW'), the change stream that Table Stream and incremental materialized views (IVM) read, is renamed to changelog, and it gets its own configuration instead of riding on CCR'sBinlogConfig. "Binlog" names a change stream in one fixed format; changelog is the general notion, and a binlog can later be built on top of it. The feature exists only on master and is documented as experimental, so this is a hard cut: there is no code that reads data written under the old names. Instead, guardrails make leftovers from an earlier master build fail with a clear message instead of crashing a process or being silently misread. CCR binlog and MySQL binlog CDC do not change.Background.
__DORIS_BINLOG_TSO__,__DORIS_BINLOG_LSN__,__DORIS_BINLOG_OP__, and, withbinlog.need_historical_value, a before-image column__BEFORE__<col>__per value column. The changes are read with thebinlog(...)table function,@incr, Table Stream and IVM refresh.binlog.enable = trueplusbinlog.format = ROW. It sharedbinlog.enableandbinlog.ttl_secondswith CCR, andenable_feature_binloggated CCR, row binlog table creation, TSO allocation, Table Stream INSERT and TTL cleanup alike.mtmv/ivm/AGENTS.mdallows incompatible changes before 2027-01. Master already made incompatible changes to it in [Enhancement] (binlog<row>) move write lsn on sink, ensure lsn same on all replica #64133, [feat](row binlog):support cloud binlog and independent binlog tablet #65810 and [feature](binlog) Add per-row LSN column for detail (DUP) tables to support IVM #66889.The problem, and what it cost.
binlogmeans.binlog.formatandbinlog.need_historical_valueand prints them in SHOW CREATE TABLE, CCR tables included; a 4.x CCR downstream rejects that DDL as unknown properties.ALTER DATABASE ... SET ("binlog.enable" = "true")on a database whose default is ROW validates the tables with the CCR rules, but what takes effect is the ROW default.binlog.format = ROWandbinlog.enable = falsecan never be enabled: the error says "can't disable binlog when format is [Row]".__BEFORE__<col>__is not under the reserved__DORIS_prefix, and schema change matched it withcontains("__BEFORE__"):__BEFORE__v1__next tov1__BEFORE__v1__;@incrDETAIL returned after values in the UPDATE_BEFORE rows; the column could not be named inbinlog()("ambiguous"); as a key column every@incrread failed; afterDROP COLUMN v1every load failedx__BEFORE__yas the last value columnADD COLUMN v2the companion index putv2before it, so the two columns swapped values in every row written afterwards, without any error; with different types every later load failed with a bad castDELETEis 1 in FE and 2 in BE).How this PR fixes it.
"binlog.enable" = "true"+"binlog.format" = "ROW""changelog.enable" = "true"binlog.ttl_seconds(on a ROW table or database),binlog.need_historical_valuechangelog.ttl_seconds,changelog.need_historical_value__binlog_config_version__changelog_config_version(no longer shown ininformation_schema.table_properties)binlog(...)table functionchangelog(...)__DORIS_BINLOG_{TSO,LSN,OP}____DORIS_CHANGELOG_{TSO,LSN,OP}____BEFORE__<col>____DORIS_CHANGELOG_BEFORE_<col>__binlog<Row>(t)changelog(t)BinlogSize/LocalBinlogSize, SHOW PARTITIONSBinlogSize, SHOW TABLET(S) / PROCIsRowBinlog,RowBinlog{Mismatch,Redundant}{Num,Tablets},RowBinlogRepairReasonChangelogSize,LocalChangelogSize,IsChangelog,Changelog...BINLOG_BROKEN,BINLOG_NOT_ENABLEDCHANGELOG_BROKEN,CHANGELOG_NOT_ENABLEDtablet_binlog_missing_timeout_second,tablet_binlog_missing_max_timestablet_changelog_missing_*binlog_compaction_*(6),max_binlog_compaction_threads, cloudbinlog_compaction_thread_num_factorchangelog_compaction_*,max_changelog_compaction_threads,changelog_compaction_thread_num_factorcompaction_task_state_total{type="binlog"},tablet_binlog_max_compaction_score; bvarsrow_binlog_ttl_*; thread poolstype="changelog",tablet_changelog_max_compaction_score,changelog_ttl_*,Changelog...poolscompact_type=row_binlog_ttl; compaction policy"binlog"; load profileRowsetBuilder {id} binlog<row>changelog_ttl;"changelog";RowsetBuilder {id} changelogCCR keeps every name:
binlog.enable / ttl_seconds / max_bytes / max_history_nums,SHOW PROC '/binlog', getBinlog / ingest_binlog,BinlogManager.2. Separate configuration.
- New
ChangelogConfig(enable,ttlSeconds,needHistoricalValue,configVersion), stored aschangelog.*keys in the table / database property map.BinlogConfigis back to the four CCR fields, so plain and CCR tables persist and print only the fourbinlog.*keys, as on 4.x.- The wire format does not change.
TabletBinlogConfig.ofis now the only place that builds theTBinlogConfig/BinlogConfigPBsent to BE and the meta service: a changelog table still sendsenable = true,binlog_format = 1(now namedCHANGELOG), its TTL,need_historical_valueandconfig_version; plain and CCR tables send exactly what they sent before. The enum mapping is explicit instead ofvalueOf(name()).- The TTL generation protocol (short TTL first, published after every tablet accepted it) moves unchanged to the changelog configuration.
-
changelog.enableandchangelog.need_historical_valuecan only be set at CREATE;changelog.ttl_secondscan be altered.binlog.formatandbinlog.need_historical_valueare rejected in every DDL, naming their replacement.- In a database whose default is
"changelog.enable" = "true", SHOW CREATE TABLE of a table without changelog prints"changelog.enable" = "false"(output only), so CREATE TABLE LIKE and re-running the DDL keep it out of the default. Temporary tables never have changelog: an explicit"changelog.enable" = "true"fails, a database default is ignored.- CCR and changelog stay mutually exclusive, now by explicit checks in CREATE / ALTER DATABASE, CREATE / ALTER TABLE and RECOVER TABLE: the CCR full sync relies on backup / restore, which changelog tables do not support, and one tablet carries only one
BinlogConfigPB.- New switch
enable_feature_changelog(FE and BE) gates changelog tables, TSO allocation, Table Stream INSERT, TTL cleanup and the changelog part of SHOW CREATE.enable_feature_binlogis back to CCR only.3. IDL names of the row-only elements are renamed; ids, enum values and types are unchanged, and shared names (
TBinlogConfig,BinlogConfigPB,binlog_config,binlog_format) stay:TTabletRole.TABLET_ROLE_ROW_BINLOG(1),TBinlogFormat.ROW(1)TABLET_ROLE_CHANGELOG,CHANGELOGTOlapTableIndexSchema.row_binlog_id(7),TOlapTableSchemaParam.row_binlog_index_schemas(17)changelog_index_id,changelog_index_schemasTMasterInfo.row_binlog_ttl_reference_tso(15)changelog_ttl_reference_tsoTBinlogScanType,TPaloScanRange.binlog_scan_type(12),TOlapScanNode.read_row_binlog(26)TChangelogScanType,changelog_scan_type,read_changelogRowsetMeta(Cloud)PB.is_row_binlog(58),TabletMeta(Cloud)PB.binlog_tablet_id(37 / 42),TabletRolePB.TABLET_ROLE_ROW_BINLOG(1),BinlogFormatPB.ROW(1)is_changelog,changelog_tablet_id,TABLET_ROLE_CHANGELOG,CHANGELOGPOlapTableIndexSchema.row_binlog_id(6),POlapTableSchemaParam.row_binlog_index_schemas(18)changelog_index_id,changelog_index_schemasPTabletWithPartition.binlog_tablet_id(3),PSyncTabletMetaRequest.discover_row_binlog_ttl(2)changelog_tablet_id,discover_changelog_ttlTabletCompactionJobPB.row_binlog_ttl_seconds(31)changelog_ttl_secondsbinlog.format = ROWwithbinlog.enable = truecannot be used except by DROP; queries (including@incr,changelog()and streams), every load path and DDL fail withTable <db>.<t> was created with "binlog.format" = "ROW", which is no longer supported; drop the table and create it again with "changelog.enable" = "true". Background daemons skip it instead of throwing or rebuilding its companion tablets. A database whose default was ROW getsbinlog.enable = falseback, with a warning, so it does not turn into a CCR database.CHECKwhen the hidden columns are missing; a changelog read or compaction without the TSO column fails instead of writing NULL TSO.__DORIS_CHANGELOG_BEFORE_<col>__. A user cannot create a column under__DORIS_, every check uses this prefix, andIvmUtil.isCommonHiddenSlotexcludes it (a user column ending in_COLwould otherwise look like a common hidden slot).CHANGE_TYPE_*(folded change types) and BECHANGELOG_OP_*(persisted op values). Values do not change.// ATTN(changelog-rename): formerly "<old>"line at its definition, so a later compatibility layer knows what to map.Results.
binlog.format, andbinlog.need_historical_valueon ROW tablesbinlog.*keys only (plus"changelog.enable" = "false"in a database whose default enables changelog)ALTER DATABASE ... SET ("binlog.enable"="true")on a database whose tables use changelogCan not enable binlog in database <db> because table <t> enables changelog__BEFORE__v1__/x__BEFORE__ywith before imagestest_changelog_before_column_name)@incr,changelog(), CREATE TABLE LIKE and CREATE STREAM fail with the message above; DROP works and removes base and companion tablets; no repeating errors afterwards"binlog"std::out_of_range(local mode)"changelog"Upgrade from an earlier master build (none of this applies to a release):
"binlog.format" = "ROW"together with its Table Streams and incremental MVs, and set"binlog.enable" = "false"on databases whose default was ROW. Recreate them with"changelog.enable" = "true"afterwards. Do not create or alter changelog tables while FEs of both versions run; downgrade is not supported.enable_feature_changelog = trueto fe.conf and be.conf;enable_feature_binlogno longer enables changelog or TSO.binlog(...), the hidden columns or the before columns must use the new names. Before-image columns now carry the reserved__DORIS_prefix, soCREATE VIEW/ CTAS / MTMVAS SELECT * FROM changelog(...)on a table withchangelog.need_historical_valuehas to list its columns (as it already had to for the TSO / LSN / OP columns). Flink Doris Connector incremental reads need a connector release that knows the new hidden column names.Release note
Rename the experimental row binlog to changelog:
"changelog.enable" = "true"replaces"binlog.enable" = "true"with"binlog.format" = "ROW",changelog.ttl_secondsandchangelog.need_historical_valuereplace the ROW uses ofbinlog.ttl_secondsandbinlog.need_historical_value, thebinlog()table function becomeschangelog(), hidden columns become__DORIS_CHANGELOG_{TSO,LSN,OP}__and before-image columns__DORIS_CHANGELOG_BEFORE_<col>__, and the new switchenable_feature_changelog(FE and BE) replacesenable_feature_binlogfor changelog. Tables created by earlier master builds with"binlog.format" = "ROW"must be dropped and recreated.Check List (For Author)
Test
Regression test
Unit Test
Manual test (add detailed scripts or steps below)
No need to test or manual test. Explain why:
FE UT: the 81 changed test classes, 1186 tests, pass. BE UT: the 62 changed suites, 692 tests, pass (3 unrelated skips).
Regression on a local cluster:
changelog_p025/25,table_stream_p016/16,mtmv_p0/ivm109/109,mtmv_ivm_restart_p02/2,time_travel_p05/5,tso_p03/3,auth_p0/test_changelog_tvf_auth,query_p0/system/test_table_properties,show_p0/test_show_create_table_and_views_nereids,bloom_filter_p0/test_bloom_filter_index.unique_with_mow_p0107/109 andtemp_table_p0/test_temp_tablefail only on the local object storage credentials (S3 LOAD / CREATE REPOSITORY); the binlog checks oftest_temp_tablepass by hand.cloud_p0was not run locally..outregenerated:test_changelog_property_keys,test_changelog_cluster_key, the newtest_changelog_before_column_name,test_table_properties(only the rows of the three removed keys go away) andtest_show_create_table_and_views_nereids(also drops 8 blocks the suite has not produced since [fix](regression) make regression test more stability #68449).test_group_commit_interval_ms_property.outis deleted: the suite has noqt_call, so the file was never read, and it still held the removedbinlog.formatkey. Result tags that said binlog are renamed, with regenerated.outshowing only the tag lines changed.Manual: the upgrade check in the Results table, on metadata written by master
15eb3f4e432.CreateViewTest.testChangelogTtlViewAnalysisnow waits for the TSO daemon to calibrate after it turns the switch on; the@incrview it creates needs a TSO, and the test raced with the daemon (the same race exists on master withenable_feature_binlog).Rebased onto master
07887d2b327. After the rebase onto33c460d7365, FE UTFrontendServiceImplTest(the one conflict),IvmAggDeltaHandlerTest,IvmNormalizeUniqKeysMTMVTestandTabletHealthProcDirTestpass, 123 tests. Cloud UT, all 33 test binaries in a Linux arm64 container, fails onlyMetaServiceTest.GetDeleteBitmapReturnsCompleteReplacementAfterTxnTooOld, which [fix](cloud) Skip stale delete bitmap aggregation #68084 and [fix](cloud) Restart incomplete delete bitmap reads after transaction expiry #68100 broke on master, and passes with its fix, [fix](cloud) Add the aggregation output rowset to the delete bitmap replacement test #69349, applied locally. The rebase from there onto07887d2b327brings in only [fix](paimon) Truncate evolved timestamps to target precision #68161 (Paimon) and [fix](cloud) Add the aggregation output rowset to the delete bitmap replacement test #69349, with no conflict.TabletHealthProcDirTest.testCloudModeCountsTabletAsHealthymocksConfig.isCloudMode()on the test thread instead of switchingConfig.deploy_modefor the whole process, as [fix](test) Isolate cloud mode in colocation proc test #65515 did forColocationGroupProcDirTest. The renames changed JUnit's method order, so the test no longer ran last; while it ran, a heartbeat took the cloud path, failed and marked both mock backends dead, and the next test could not create its table.check_before_quitdrops a table stream with DROP STREAM. It replays everything SHOW TABLES lists into its own database and dropped each object there with DROP TABLE, which refuses a stream. The rename movesregression_test_changelog_p0ahead ofregression_test_check_before_quitin name order, andtest_changelog_before_column_nameleaves an IVM stream there, so the copied stream reached that DROP TABLE.test_ivm_minmax_countandtest_ivm_minmax_count_join, which [feature](ivm) Track MIN/MAX extreme counts for incremental refresh #69286 added on master after this PR was opened, use the changelog properties.test_changelog_property_keyssets"storage_format" = "V2"on the tables whose SHOW CREATE TABLE it checks, or on their LIKE sources. In fuzzy mode the FE drawsuse_v3_storage_formatat random for each connection, and a table created without a storage format then gets V3, which SHOW CREATE TABLE prints; P0 failed on this in one of its two runs. On a local cluster (FE built from this branch after the rebase, BE from an earlier build of it) withSET GLOBAL use_v3_storage_format = true, the suite fails as on P0 without the change and passes with it, and all 25changelog_p0suites pass; with the default it passes, and-forceGenOutleaves its.outunchanged.Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)