Skip to content

Ingest the oplog through hashed connectors - #2869

Merged
bert-e merged 1 commit into
development/9.6from
improvement/BB-906/hashed-oplog-ingestion
Oct 21, 2026
Merged

bert-e merged 1 commit into
development/9.6from
improvement/BB-906/hashed-oplog-ingestion

Conversation

@delthas

@delthas delthas commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Hand-written description (took me a while). I tried to do much more hand-written and rountrip work with AI. Let me know if it helps :)

This implements the oplog scaling design for the oplog populator (see https://github.com/scality/citadel/pull/375 for details).

The issue with the previous design was that:

  • Buckets without lifecycle/... rules weren't exported, but we need this for direct-to-cold
  • The number of connectors grew linearly with the number of buckets, which does not work if we have too many buckets

Instead, we listen to all buckets all the time, splitting load across N connectors, with a simple k = hash(bucket) % N.

This is implemented as an opt-in ingestion mode: zenko-operator enables it through a ZenkoVersion feature flag (https://github.com/scality/zenko-operator/pull/656), so each Zenko release decides when to switch. The goal is to drop the previous mode entirely in the short term. (That is why I chose not to have an abstraction over possible modes etc. The goal is to have only one mode left, soon, and delete legacy code.)

This is part of a stack of 8 PRs: the lower ones add the building blocks and the manager, this one wires it in, #2888 adds monitoring, and #2889 fixes existing oplog populator alerts. Review bottom-up.

The general idea is:

  • I add a new ingestion mode, hashed, opt-in
  • We "reconcile" connectors every 15 seconds, taking care of
    • if a new install, adding our connectors
    • ensuring our connectors are ready/not failed
    • if a migration, properly stopping previous connectors, creating ours, then deleting previous ones. The migration is a bit tricky but properly explained in the code.

The connector name is:

  • a prefix (to ignore anything that's not ours at all),
  • then N and k
  • and a hash such that we can easily spot outdated pipelines

Issue: BB-906

@bert-e

bert-e commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Hello delthas,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval ⭐
/bypass_build_status Bypass the build and test status ⭐
/bypass_commit_size Bypass the check on the size of the changeset TBA ⭐
/bypass_incompatible_branch Bypass the check on the source branch prefix ⭐
/bypass_jira_check Bypass the Jira issue check ⭐
/bypass_peer_approval Bypass the pull request peers' approval ⭐
/bypass_leader_approval Bypass the pull request leaders' approval ⭐
/bypass_source_branch_lineage Bypass the cross-branch contamination check ⭐
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request.
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@codecov

codecov Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.05556% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.94%. Comparing base (36f5aba) to head (91a9570).
⚠️ Report is 4 commits behind head on development/9.6.

Files with missing lines Patch % Lines
extensions/oplogPopulator/OplogPopulator.js 91.66% 5 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

Files with missing lines Coverage Δ
...ns/oplogPopulator/OplogPopulatorConfigValidator.js 100.00% <100.00%> (ø)
extensions/oplogPopulator/OplogPopulator.js 95.79% <91.66%> (+2.70%) ⬆️

... and 6 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 85.50% <ø> (ø)
Core Library 87.35% <ø> (+0.29%) ⬆️
Ingestion 83.38% <ø> (ø)
Lifecycle 86.24% <ø> (ø)
Oplog Populator 94.27% <93.05%> (+0.42%) ⬆️
Replication 68.67% <ø> (+0.05%) ⬆️
Bucket Scanner 89.37% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.6    #2869      +/-   ##
===================================================
+ Coverage            81.77%   81.94%   +0.17%     
===================================================
  Files                  216      216              
  Lines                45247    45313      +66     
===================================================
+ Hits                 37000    37134     +134     
+ Misses                8247     8179      -68     
Flag Coverage Δ
api:retry 14.26% <16.66%> (+<0.01%) ⬆️
api:routes 14.28% <16.66%> (+<0.01%) ⬆️
bucket-scanner 89.37% <ø> (ø)
ft_test:queuepopulator 18.05% <16.66%> (+1.04%) ⬆️
ingestion 20.10% <16.66%> (-0.01%) ⬇️
lib 12.63% <16.66%> (+<0.01%) ⬆️
lifecycle 26.20% <16.66%> (-0.02%) ⬇️
notification 1.85% <0.00%> (-0.01%) ⬇️
oplogPopulator 0.58% <0.00%> (-0.01%) ⬇️
replication 24.69% <16.66%> (-0.03%) ⬇️
unit 68.36% <93.05%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread extensions/oplogPopulator/modules/HashedConnectorsManager.js Outdated
Comment thread extensions/oplogPopulator/OplogPopulatorConfigValidator.js Outdated
@scality scality deleted a comment from bert-e Oct 8, 2026
@bert-e

bert-e commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@delthas
delthas marked this pull request as draft October 8, 2026 16:51
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from f512379 to d4b2816 Compare October 8, 2026 17:03
@delthas
delthas marked this pull request as ready for review October 8, 2026 17:05
Comment thread extensions/oplogPopulator/modules/HashedConnectorsManager.js Outdated
Comment thread monitoring/oplog-populator/alerts.yaml Outdated
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch 2 times, most recently from b02ea60 to aea4f4f Compare October 9, 2026 14:05
@bert-e

bert-e commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • 2 peers

@scality scality deleted a comment from bert-e Oct 9, 2026
Comment thread extensions/oplogPopulator/modules/HashedConnectorsManager.js Outdated
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch 2 times, most recently from 6a15600 to d555261 Compare October 9, 2026 14:15
Comment thread extensions/oplogPopulator/modules/HashedConnectorsManager.js Outdated
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch 3 times, most recently from 3999fe6 to 7712a12 Compare October 13, 2026 11:12
Comment thread extensions/replication/ReplicationQueuePopulator.js Outdated
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from 7712a12 to 342a7bb Compare October 13, 2026 11:28
Comment thread extensions/oplogPopulator/modules/HashedConnectorsManager.js Outdated
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from 4a6f28c to ac2d6b0 Compare October 15, 2026 17:40
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from ac2d6b0 to c71bec8 Compare October 15, 2026 17:56
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from c71bec8 to ab34f51 Compare October 16, 2026 08:29
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch 2 times, most recently from ffb80e6 to 8d75933 Compare October 16, 2026 12:19
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from 8d75933 to 4a376b6 Compare October 16, 2026 12:54

@DarkIsDude DarkIsDude left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, check how to manage older version of Mongo but fine otherwise

Comment thread extensions/oplogPopulator/OplogPopulator.js Outdated
Comment thread extensions/oplogPopulator/OplogPopulator.js
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from 4a376b6 to 34447f0 Compare October 19, 2026 09:06
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch from 34447f0 to 6567b0a Compare October 19, 2026 10:29
@delthas
delthas force-pushed the improvement/BB-906/hashed-oplog-ingestion branch 3 times, most recently from ac6195f to c519982 Compare October 20, 2026 14:44
@delthas
delthas removed this pull request from stack #2886 October 20, 2026 14:45
Setting `ingestion` to `hashed` (EXTENSIONS_OPLOG_POPULATOR_INGESTION)
makes the oplog populator ingest the whole oplog through N hashed
connectors (numberOfConnectors), migrating any existing connector to
them. zenko-operator opts in through a ZenkoVersion feature flag.
`ingestion` defaults to `perBucket`, which keeps the previous
per-bucket connectors; switching back deletes the hashed connectors
and loses events in between.

- Requires Kafka Connect >= 3.5 (offsets and stop APIs): migrations
  wait until it is rolled out.
- Setup only schedules the reconciliation, so that probes answer while a
  migration runs. In hashed ingestion, readiness no longer requires the
  metastore change stream, which it does not use.
- Without bucket changes to react to, hashed connectors are reconciled
  every 15s by default instead of every second.
- Connectors start at MongoDB's cluster time, not the pod's clock.

Issue: BB-906
@delthas

delthas commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/9.6

The following branches have NOT changed:

  • development/7.10
  • development/7.4
  • development/7.70
  • development/8.6
  • development/9.0
  • development/9.1
  • development/9.2
  • development/9.3
  • development/9.4
  • development/9.5

This pull request did not target the following hotfix branch(es) so they
were left untouched:

  • hotfix/7.2.0
  • hotfix/7.6.0
  • hotfix/7.10.3
  • hotfix/7.4.1
  • hotfix/7.10.0
  • hotfix/7.10.2
  • hotfix/9.0.4
  • hotfix/7.10.1
  • hotfix/7.4.10
  • hotfix/7.7.0
  • hotfix/7.4.7
  • hotfix/7.10.12
  • hotfix/7.10.17
  • hotfix/8.2.12
  • hotfix/7.4.6
  • hotfix/7.4.9
  • hotfix/9.0.7
  • hotfix/7.70.12
  • hotfix/7.70.15
  • hotfix/7.4.5
  • hotfix/7.9.0
  • hotfix/7.8.0
  • hotfix/7.4.4
  • hotfix/7.4.8
  • hotfix/7.4.3
  • hotfix/7.4.0
  • hotfix/7.10.4
  • hotfix/7.4.2
  • hotfix/7.10.8
  • hotfix/7.70.1

Please check the status of the associated issue BB-906.

Goodbye delthas.

The following options are set: approve

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.

5 participants