Skip to content

26.8 integrations lane: Kafka, MVs, PostgreSQL/dictionaries, ops (FLEECH-606) - #66

Draft
Khatskevich wants to merge 9 commits into
v26.8.34.13-lts-aiven-early-availabilityfrom
v26.8.34.13-lts-aiven-dev-integration-lane
Draft

Khatskevich wants to merge 9 commits into
v26.8.34.13-lts-aiven-early-availabilityfrom
v26.8.34.13-lts-aiven-dev-integration-lane

Conversation

@Khatskevich

@Khatskevich Khatskevich commented Nov 16, 2026 •

Copy link
Copy Markdown

Integrations lane of the 26.8 uplift (FLEECH-606, epic FLEECH-576), on top of v26.8.34.13-lts-aiven-early-availability. One commit per patch identity, each with its dossier under docs/aiven/patches/; follow-up fixes are folded into their patch.

Ticket 7 — Kafka (done)

Commit Patch Outcome on 26.8
f3189241c56 030 kafka_num_consumers = 0 as-is; context conflict next to upstream's new upper bound
bce825b9b53 029 SASL/SSL settings as enums 26.3 design kept (to be reconsidered); upstream's new AWS_MSK_IAM refused (Aiven decision: it signs with the server's AWS identity); kafka_ssl_* registered with upstream's named-collection override check
a48613e8f3f 031 schema-registry URL alias alias masked like format_avro_schema_registry_url; log fix moved to AvroConfluentSchemaRegistry.cpp
e9ee3f82fde 033 producer settings compression aliases registered with the override check; producer knobs not (applied before the collection)
3717290762b 032 per-table offset reset clean on top of 029
bf67d584282 076 offset reset by duration context conflicts only

Ticket 8 — refreshable MVs (done)

Commit Patch Outcome on 26.8
76cfc98a7ce 050 RMVs on Apache ZooKeeper (absorbs N02) rewrite: stock 26.8 rejects coordinated RMVs on ZooKeeper and disables existing ones at startup; give-up path neutralized at its single check, Keeper-only ops gated with ZooKeeper fallbacks; Keeper path unchanged
c826f7b21ee 049 RMV shard macro as-is; tryGetDatabase; lands after 050, so its test needs no Keeper-flag pinning
92f088c5441 066 RMVs in sharded Replicated databases (absorbs 078) rewrite onto 26.8's refresh code; includes the 26.3 fixes 825f7b06b05 and 69f13676f85 (FLEECH-776, #67); upstream still empties other shards' targets on every refresh

Sources: 26.3 commits on v26.3.60.2-lts-aiven (066: b86c0c1b517, 825f7b06b05, 69f13676f85). patch-fix(004) was dropped on the rebase: the EA base carries Tilman's own fix of that test.

Open for review:

  • Buildkite clickhouse-7629 build 63 on 92f088c5441: running. Build 62 (first 066 push): every RMV suite aborted — executeRefresh called Keeper without a component (enforce_keeper_component_tracking in CI); fixed and folded into 066. Build 60 (before the rebase, without 066): passed, integration 44/44.
  • 066 known limits carried from 26.3: DROP DATABASE on one replica removes the shared coordination znode; a failed shard insert makes the leader wait up to 2 h. Upstream test_refreshable_mv (znode path) and some test_refreshable_mv_no_multi_read cases fail by design.
  • 029 keeps 26.3's always-applied defaults; they override a named collection's nested kafka.* keys and the server <kafka> section. Listed under the dossier's Retirement for reconsideration.

Verification

  • Local arm64 debug build: all aiven_029/030/031/032/033/076_* stateless tests pass; related upstream Kafka/named-collection/masking stateless tests show no regressions (failures were environment-only).
  • 066: two local servers as two shards keep each shard's rows across refreshes led from either shard (with and without APPEND); znodes in the 25.8 and 26.3 layouts are read and rewritten; upstream's refreshable-view stateless tests pass.

@Khatskevich
Khatskevich force-pushed the v26.8.34.13-lts-aiven-dev-integration-lane branch 3 times, most recently from 32f56bd to a2d2deb Compare November 17, 2026 09:22
@tilman-aiven
tilman-aiven force-pushed the v26.8.34.13-lts-aiven-dev branch from 0474c71 to cd2fed0 Compare November 18, 2026 09:35
Khatskevich and others added 8 commits November 19, 2026 18:03
Aiven pauses a Kafka integration by setting its table's kafka_num_consumers
to 0, which keeps the table and its views in place. Upstream rejects 0 at
CREATE. Drop that lower bound, keep 26.8's new upper bound, and treat 0 as 1
in both getMaxBlockSize implementations so nothing can divide by zero.

26.8's StorageKafka2 already skips empty consumer slots, so a paused
Keeper-backed table is a supported state; a direct SELECT on it fails with
QUERY_NOT_ALLOWED.

Test: aiven_030_kafka_num_consumers_zero (both engines).

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aiven's Kafka integration tables carry their own TLS files and endpoint
identification in table settings. Upstream has kafka_security_protocol and
kafka_sasl_mechanism only as strings and no kafka_ssl_* settings, so these
tables would not attach. Carry the 26.3 design: enum-typed protocol,
mechanism and endpoint identification (default none), plus the three SSL
file locations, always applied in updateConfigurationFromConfig.

26.8 added AWS MSK IAM, which signs with the server's own AWS credentials;
Aiven does not offer it. The enum has no AWS_MSK_IAM, so CREATE rejects it,
and an AWS_MSK_IAM from server config or a named collection's nested key is
refused with SUPPORT_IS_DISABLED when the configuration is built. Upstream's
MSK setup is no longer called.

26.8 also checks that a table may replace a named collection's librdkafka
keys only with SHOW NAMED COLLECTIONS SECRETS, and knows flat settings by
name. Register the four kafka_ssl_* settings there, so they cannot replace
a collection's CA, client certificate or host-name check without the
privilege or past NOT OVERRIDABLE.

Known and kept on purpose for now: the always-applied defaults override a
named collection's nested kafka.* keys and the server <kafka> section. The
dossier lists this under Retirement as the thing to reconsider.

Test: aiven_029_kafka_sasl_ssl_settings,
aiven_029_kafka_sasl_ssl_settings_named_collection,
aiven_029_kafka_aws_msk_iam_refused. Upstream 04218_kafka_aws_msk_iam_auth_settings
now fails by design.

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Kevin Michel <kevin.michel@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…gging

Aiven integration tables store the registry URL as
kafka_format_avro_schema_registry_url, which upstream does not know.
Keep it as an alias forwarded to format_avro_schema_registry_url, and add
it to Kafka's secret-masking list so its password is hidden in SHOW
CREATE and the query log the same way 26.8 hides the canonical name's.

The schema-fetch trace log still prints the full URL with credentials;
on 26.8 it lives in AvroConfluentSchemaRegistry.cpp. Strip user info
from the logged copy. Upstream's basic auth is used as is.

Test: aiven_031_kafka_schema_registry_auth.

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Kevin Michel <kevin.michel@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aiven integrations let users tune the producer behind INSERT INTO a Kafka
table. Carry the six kafka_producer_* settings (batch size and count,
linger, queue limits, acks) and keep kafka_producer_compression_codec and
_level as aliases of upstream's kafka_compression_* settings.

26.8 added a check that a table may replace a named collection's
librdkafka keys only with SHOW NAMED COLLECTIONS SECRETS. It knows flat
settings by name. The compression aliases are applied after the
collection like upstream's kafka_compression_*, so they are listed there.
The producer settings are not: they are set before the collection's keys,
so the collection wins and they never replace anything.

Test: aiven_033_kafka_extra_settings, aiven_033_kafka_extra_settings_named_collection.

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… alias

Upstream hardcodes auto.offset.reset = earliest, so a table cannot start a
new consumer group at the end of a topic. Add kafka_auto_offset_reset
(default earliest, as before) and keep kafka_date_time_input_format as an
alias of date_time_input_format, forwarded only when the table sets it.
Aiven integration tables store both.

Test: aiven_032_kafka_offset_reset_datetime.

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Kevin Michel <kevin.michel@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…or time-based consumer offset reset

A new Kafka integration on a long-retention topic can only start at the
earliest or latest message. kafka_auto_offset_reset_by_duration_ms makes
partitions without a committed offset start at now minus the duration,
resolved with offsetsForTimes, in both engines: in StorageKafka's
assignment callback (mutating the list cppkafka then assigns) and in
StorageKafka2's updateOffsets. On failure it falls back to
auto.offset.reset. 0, the default, changes nothing.

26.8 conflicts were context only, next to the new waited_for_assignment
and block_start_offsets.

Test: aiven_076_kafka_offset_reset_by_duration (setting surface; the
resolution needs a broker).

Original author: Joe Lynch <joelynch112@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eeper (rather than ClickHouse Keeper)

Aiven runs ClickHouse on Apache ZooKeeper, which lacks the Keeper-only
MULTI_READ and CREATE_IF_NOT_EXISTS extensions. Stock 26.8 requires both
for coordinated refreshable views: CREATE fails with NOT_IMPLEMENTED, and
at startup every existing view is put into a permanent "coordination
unavailable" state, so upgrading a ZooKeeper-backed service disables all
its refreshable views.

Make coordination work without them and neutralize the give-up path at its
single check (coordinationFeatureFlagsMissing returns false; its failpoints
still work). On ZooKeeper the coordination znodes are created one by one,
accepting existing ones; reads fall back to separate requests; and the
/running create is an existence check plus a plain create instead of
CreateIfNotExists, which ZooKeeper cannot parse and which made it drop the
shared session (formerly patch N02, absorbed). On ClickHouse Keeper the
code path is upstream's.

Test: test_aiven_refreshable_mv_zookeeper (Keeper with every extension off,
plus a default-Keeper control). Upstream test_refreshable_mv_no_multi_read
cases that expect the view to end Disabled now fail by design.

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Aliaksei Khatskevich <alex.khatskevich@aiven.io>
Co-authored-by: Joe Lynch <joe.lynch@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…shard macro in the target table

A coordinated refreshable MV in a Replicated database expands
default_replica_path without the database's shard name, so on servers
without a global <shard> macro CREATE fails with NO_ELEMENTS_IN_CONFIG.
Pass the Replicated database's shard name for {shard}. Look the database
up with tryGetDatabase so a missing entry cannot fail table load.

The test now pins both Keeper feature flags 26.8 needs for coordination.

Test: test_aiven_refreshable_mv_shard_macro_expansion.

Original author: Tilman Moeller <tilman.moeller@aiven.io>
Co-authored-by: Joe Lynch <joe.lynch@aiven.io>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Khatskevich
Khatskevich force-pushed the v26.8.34.13-lts-aiven-dev-integration-lane branch from 1cbc5c0 to c826f7b Compare November 19, 2026 17:05
@Khatskevich
Khatskevich changed the base branch from v26.8.34.13-lts-aiven-dev to v26.8.34.13-lts-aiven-early-availability November 19, 2026 17:05
…s of a Replicated database

In a Replicated database with several shards, every DDL of a refresh
(CREATE of the new table, EXCHANGE, DROP) runs on all shards, while the
INSERT stays in one. Upstream 26.8 still lets each shard refresh on its
own, so each EXCHANGE empties the target table on the other shards.

As on 25.8 and 26.3, all shards share one coordination znode. The
replica that starts a refresh leads it: it creates the new table and
publishes its UUID, one replica of every shard inserts its shard's rows
into it, and the leader does the one EXCHANGE after all shards are done.

Re-applied onto 26.8's refresh code rather than resolving 26.3's diff.
Includes 078 and both 26.3 fixes: 825f7b0 (take the shard before
publishing the refresh directory) and 69f1367 (FLEECH-776: read
znodes by field name; back off on repeated errors). The znode parser
also reads the fields upstream added in 26.8, and refresh_dir is
written where 26.3 servers look for it during a rolling upgrade.

Changes from 26.3: helpers take the refresh directory as an argument
instead of sharing it between threads; a participant skips a shard
already marked finished; the leader removes only its own directory.
Dropped the dead post-EXCHANGE wait, tryBecomeGlobalLeader and its
failpoint, and the stale-directory cleanup that never matched.

Source: b86c0c1, 825f7b0, 69f1367 on v26.3.60.2-lts-aiven.
Tests: test_aiven_mv_refresh_sharded; gtest RefreshTaskCoordinationZnode.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Khatskevich
Khatskevich force-pushed the v26.8.34.13-lts-aiven-dev-integration-lane branch from 45a4b5d to 92f088c Compare November 19, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant