Skip to content

Support multiple disjoint ranges in native CDC streams - #13971

Merged
tclinkenbeard-oai merged 13 commits into
apple:mainfrom
tclinkenbeard-oai:dev/tclinkenbeard/native-cdc-multiple-ranges
Sep 17, 2026
Merged

tclinkenbeard-oai merged 13 commits into
apple:mainfrom
tclinkenbeard-oai:dev/tclinkenbeard/native-cdc-multiple-ranges

Conversation

@tclinkenbeard-oai

Copy link
Copy Markdown
Collaborator

Native CDC consumers that track disjoint key ranges currently need separate streams. Allow one stream to register an immutable union of ranges, with one stream ID, tag assignment, cursor, and acknowledgement watermark.

Registration canonicalizes overlapping and adjacent ranges and bounds the range count and encoded metadata size. Routing covers each selected interval, and proxy filtering splits clears at gaps while preserving mutation order, complete-version delivery, and buffer accounting. Update the native, thread-safe, multiversion, and C APIs, along with listing and durable metadata, directly because the feature is unreleased.

Add coverage for canonical identity, invalid inputs, gap exclusion, clear ordering, proxy replacement, transaction-system recovery, and C API ownership through both direct and external clients.

Validation:

  • 39 tests passed across the CDC client/metadata, logsystem, and CDC proxy unit targets.
  • NativeCdcMultipleRanges, NativeCdcReplyChunking, and NativeCdcSharedTag simulations passed with no severity-40 events.
  • Both CDC C binding tests passed through direct and external clients (86 assertions per path).

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

This comment has been minimized.

@ploxiln

ploxiln commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator
...
    <QuietDatabaseStartFail Severity="30" Time="39.162108" DateTime="2026-09-16T22:24:21Z" Machine="0.0.0.0:0" ID="0000000000000000" Reasons="DataDistributionActive" FailedAfter="27.2861" Timeout="1500" ThreadID="10157926774073603894" LogGroup="default"/>
    <QuietDatabaseStartFail Severity="30" Time="40.185854" DateTime="2026-09-16T22:24:21Z" Machine="0.0.0.0:0" ID="0000000000000000" Reasons="DataDistributionActive" FailedAfter="28.3098" Timeout="1500" ThreadID="10157926774073603894" LogGroup="default"/>
    <QuietDatabaseStartFail Severity="30" Time="41.209842" DateTime="2026-09-16T22:24:21Z" Machine="0.0.0.0:0" ID="0000000000000000" Reasons="DataDistributionActive" FailedAfter="29.3338" Timeout="1500" ThreadID="10157926774073603894" LogGroup="default"/>
    <InternalError Severity="40" ErrorKind="BugDetected" Time="174.205500" DateTime="2026-09-16T22:24:25Z" Type="InternalError" Machine="3.4.3.1:1" ID="0000000000000000" Error="internal_error" ErrorDescription="An internal error occurred" ErrorCode="4100" FailedAssertion="now() &lt; deadline" LeftValue="174.205" RightValue="174.178" File="/codebuild/output/src3289176691/src/github.com/apple/foundationdb/fdbserver/workloads/NativeCdcEndToEnd.cpp" Line="1239" ThreadID="10157926774073603894" Backtrace="/usr/bin/addr2line -e /var/joshua/ensembles/20260916-222107-pr13971-4737e14f-17138-2dfb50f6b6848016/bin/fdbserver -p -C -f -i 0x43e77a6 0x43e5c51 0x43e5dbd 0x42de763 0x45b3f8 0x130f5a5 0x13088e8 0x12c5c90 0x12f60f0 0x12fea48 0x12d11a8 0x12c41f8 0x12c3b50 0x12d11a8 0x12de5b8 0x12fc4b2 0x12d11a8 0x12d4c88 0x396de7b 0x396e1f0 0x3a7b8e0 0x988d7a 0x7fb68905c610" LogGroup="default" Roles="TS"/>
    <SystemError Severity="40" ErrorKind="Unset" Time="174.205500" DateTime="2026-09-16T22:24:25Z" Type="SystemError" Machine="3.4.3.1:1" ID="0000000000000000" Error="internal_error" ErrorDescription="An internal error occurred" ErrorCode="4100" ThreadID="10157926774073603894" Backtrace="/usr/bin/addr2line -e /var/joshua/ensembles/20260916-222107-pr13971-4737e14f-17138-2dfb50f6b6848016/bin/fdbserver -p -C -f -i 0x43e77a6 0x43e5c51 0x43e5dbd 0x42de46b 0x42de775 0x45b3f8 0x130f5a5 0x13088e8 0x12c5c90 0x12f60f0 0x12fea48 0x12d11a8 0x12c41f8 0x12c3b50 0x12d11a8 0x12de5b8 0x12fc4b2 0x12d11a8 0x12d4c88 0x396de7b 0x396e1f0 0x3a7b8e0 0x988d7a 0x7fb68905c610" LogGroup="default" Roles="TS"/>
    <Crash Severity="40" ErrorKind="BugDetected" Time="174.205500" DateTime="2026-09-16T22:24:25Z" Type="Crash" Machine="3.4.3.1:1" ID="0000000000000000" Signal="6" Name="Aborted" Trace="/usr/bin/addr2line -e /var/joshua/ensembles/20260916-222107-pr13971-4737e14f-17138-2dfb50f6b6848016/bin/fdbserver -p -C -f -i 0x7fb689071b30" ThreadID="10157926774073603894" Backtrace="/usr/bin/addr2line -e /var/joshua/ensembles/20260916-222107-pr13971-4737e14f-17138-2dfb50f6b6848016/bin/fdbserver -p -C -f -i 0x43e77a6 0x43e5c51 0x43e5dbd 0x43957c5 0x7fb689071b30" LogGroup="default" Roles="TS"/>
    <WarningLimitExceeded Severity="30" WarningCount="14"/>
    <TestUnexpectedlyNotFinished Severity="40" LastTraceTime="174.2055" LastTraceType="Crash"/>
    <StdErrOutput Severity="40" Output="Assertion failed @ /codebuild/output/src3289176691/src/github.com/apple/foundationdb/fdbserver/workloads/NativeCdcEndToEnd.cpp 1239:"/>
    <StdErrOutput Severity="40" Output="  expression:"/>
    <StdErrOutput Severity="40" Output="              now() &lt; deadline"/>
    <StdErrOutput Severity="40" Output="  expands to:"/>
    <StdErrOutput Severity="40" Output="              174.205 &lt; 174.178"/>
    <StdErrOutput Severity="40" Output=""/>
    <StdErrOutput Severity="40" Output="  /usr/bin/addr2line -e /var/joshua/ensembles/20260916-222107-pr13971-4737e14f-17138-2dfb50f6b6848016/bin/fdbserver -p -C -f -i 0x42de5b0 0x45b3f8 0x130f5a5 0x13088e8 0x12c5c90 0x12f60f0 0x12fea48 0x12d11a8 0x12c41f8 0x12c3b50 0x12d11a8 0x12de5b8 0x12fc4b2 0x12d11a8 0x12d4c88 0x396de7b 0x396e1f0 0x3a7b8e0 0x988d7a 0x7fb68905c610"/>
    <StdErrOutput Severity="40" Output="SIGNAL: Aborted (6)"/>
    <StdErrOutput Severity="40" Output="Trace: /usr/bin/addr2line -e /var/joshua/ensembles/20260916-222107-pr13971-4737e14f-17138-2dfb50f6b6848016/bin/fdbserver -p -C -f -i 0x7fb689071b30"/>
    <JoshuaLogTool ExitCode="0" Note="Skipped - joshua_logtool not enabled"/>
  </Test>
</Trace>

[Container] 2026/09/16 22:31:03.464873 Running command if [ -x /usr/local/bin/repro.sh ]; then cat "joshua_tail_${ENSEMBLE_ID}.log" | /usr/local/bin/repro.sh; fi
fdbserver -r simulation --crash --logsize 1024MB -f src/foundationdb/tests/fast/NativeCdcMemoryBound.toml --buggify off --seed 954530344

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-ide on Linux RHEL 9

  • Commit ID: 3b0a1fd
  • Duration 0:27:54
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang-arm on Linux RHEL 9

  • Commit ID: 3b0a1fd
  • Duration 0:51:15
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

This comment has been minimized.

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-clang on Linux RHEL 9

  • Commit ID: 3b0a1fd
  • Duration 1:02:36
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-cluster-tests on Linux RHEL 9

  • Commit ID: 3b0a1fd
  • Duration 1:32:50
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)
  • Cluster Test Logs zip file of the test logs (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos-m1 on macOS 14.x

  • Commit ID: 3b0a1fd
  • Duration 1:55:39
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr on Linux RHEL 9

  • Commit ID: 3b0a1fd
  • Duration 1:05:07
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci

Copy link
Copy Markdown
Contributor

Result of foundationdb-pr-macos on macOS 14.x

  • Commit ID: 3b0a1fd
  • Duration 5:01:56
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@tclinkenbeard-oai
tclinkenbeard-oai merged commit fba55fe into apple:main Sep 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CDC Relates to the FDB native CDC feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants