Skip to content

Downgrade node-rdkafka to 3.0.1 - #2773

Merged
bert-e merged 2 commits into
development/9.4from
improvement/BB-806/downgrade-node-rdkafka
Jul 17, 2026
Merged

Downgrade node-rdkafka to 3.0.1#2773
bert-e merged 2 commits into
development/9.4from
improvement/BB-806/downgrade-node-rdkafka

Conversation

@delthas

@delthas delthas commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Downgrades node-rdkafka from ^3.6.0 to exactly 3.0.1.

Why

librdkafka >= 2.5.0 cannot consume messages stored in the legacy v0/v1 MessageSet format: when the FetchResponse uses a flexible version (v12+), the legacy reader parses the Key/Value length prefixes as compact varints instead of fixed int32, so every message is delivered with NULL key and value (plus Unsupported Message(Set) MagicByte errors). Reported upstream with a fix: confluentinc/librdkafka#5549 / confluentinc/librdkafka#5550.

S3C federation pins log.message.format.version=0.10.2.2 on the backbeat-queue brokers, so all messages are stored/served in the legacy v1 format: since #2728 (node-rdkafka ^3.6.0 / librdkafka 2.12.0), backbeat cannot process any kafka entry on S3C — every entry fails with malformed JSON in kafka entry — Cannot read properties of null (reading 'bootstrapId') and replication stays PENDING. This currently blocks the S3C 10 component bump (scality/Federation#6993).

Why 3.0.1

  • Newest node-rdkafka release bundling librdkafka 2.3.0 — the exact librdkafka backbeat ran until 9.3.x (no release ever bundled the last-good 2.4.x; 3.1.0 jumps to the broken 2.5.0).
  • 3.0.0 is 2.18.0 (the pre-fix(deps): bump node-rdkafka to ^3.6.0 to fix cooperative-sticky rebalance bug #2728 lockfile resolution) with only EOL Node versions dropped; 3.0.1 adds one additive OAuthBearer API. Binding-side changes up to 3.6.1 are not relevant to backbeat (TS typings, cooperative rebalance — unused, we pin eager range,roundrobin — Node 23/24 support).
  • All app-side fixes from fix(deps): bump node-rdkafka to ^3.6.0 to fix cooperative-sticky rebalance bug #2728 (bootstrap chained-setTimeout, partition.assignment.strategy pin) are kept.
  • Verified against a Kafka 3.9.1 broker configured with log.message.format.version=0.10.2.2: 3.0.1 consumes legacy v1 topics with intact key/value; 3.1.0+ does not.

The pin must not be raised past 3.0.1 until node-rdkafka bundles a librdkafka release containing the fix from confluentinc/librdkafka#5550. Note: Node >= 24 support will require node-rdkafka >= 3.6.1 (nan bump), so the re-bump must precede or accompany any Node 24 migration.

Issue: BB-806

librdkafka >= 2.5.0 cannot consume messages stored in the legacy
v0/v1 MessageSet format: when the FetchResponse uses a flexible
version (v12+), the legacy reader parses the Key/Value length
prefixes as compact varints instead of fixed int32, so every message
is delivered with NULL key and value and the consumer logs
'Unsupported Message(Set) MagicByte' errors.

S3C federation pins log.message.format.version=0.10.2.2 on the
backbeat-queue brokers, so all messages are stored and served in the
legacy v1 format: backbeat >= 9.4 (node-rdkafka ^3.6.0 / librdkafka
2.12.0) cannot process any kafka entry on S3C, and replication stays
PENDING. This blocks the S3C 10 component bump (Federation PR 6993).

Pin node-rdkafka to exactly 3.0.1, the newest release bundling
librdkafka 2.3.0 (the version backbeat ran until 9.3.x): 3.0.0 is
2.18.0 with only EOL Node versions dropped, and 3.0.1 only adds an
OAuthBearer setToken API. The app-side fixes from the original bump
(bootstrap chained-setTimeout, partition.assignment.strategy pin)
are kept.

The pin must not be raised past 3.0.1 until node-rdkafka bundles a
librdkafka release containing the upstream fix:
confluentinc/librdkafka#5550
Note that Node >= 24 support will require node-rdkafka >= 3.6.1.

Reported upstream: confluentinc/librdkafka#5549

Issue: BB-806
@bert-e

bert-e commented Jul 16, 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
/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 TBA
/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 Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.85%. Comparing base (38ae614) to head (6ca94e4).
⚠️ Report is 2 commits behind head on development/9.4.

Additional details and impacted files

Impacted file tree graph
see 3 files with indirect coverage changes

Components Coverage Δ
Bucket Notification 80.22% <ø> (ø)
Core Library 81.33% <ø> (-0.02%) ⬇️
Ingestion 71.24% <ø> (+0.60%) ⬆️
Lifecycle 79.06% <ø> (ø)
Oplog Populator 85.83% <ø> (ø)
Replication 59.63% <ø> (ø)
Bucket Scanner 85.76% <ø> (ø)
@@                 Coverage Diff                 @@
##           development/9.4    #2773      +/-   ##
===================================================
+ Coverage            74.81%   74.85%   +0.04%     
===================================================
  Files                  201      201              
  Lines                13747    13747              
===================================================
+ Hits                 10285    10291       +6     
+ Misses                3452     3446       -6     
  Partials                10       10              
Flag Coverage Δ
api:retry 9.10% <ø> (ø)
api:routes 8.92% <ø> (ø)
bucket-scanner 85.76% <ø> (ø)
ft_test:queuepopulator 10.96% <ø> (ø)
ingestion 12.60% <ø> (+0.05%) ⬆️
lib 7.85% <ø> (+<0.01%) ⬆️
lifecycle 18.95% <ø> (+0.02%) ⬆️
notification 1.01% <ø> (ø)
oplogPopulator 0.14% <ø> (ø)
replication 18.64% <ø> (+0.02%) ⬆️
unit 51.57% <ø> (ø)

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.

@scality scality deleted a comment from bert-e Jul 16, 2026
@delthas
delthas requested review from francoisferrand and removed request for benzekrimaha July 16, 2026 15:46
@delthas

delthas commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Requested @francoisferrand in place of Maha Benzekri, who is currently on PTO.

@bert-e

bert-e commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Request integration branches

Waiting for integration branch creation to be requested by the user.

To request integration branches, please comment on this pull request with the following command:

/create_integration_branches

Alternatively, the /approve and /create_pull_requests commands will automatically
create the integration branches.

@francoisferrand francoisferrand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(note: description is a bit hard to follow, kind of mixing librdkafka version with node-rdkafka versions)

@leif-scality

Copy link
Copy Markdown

Can you bump the package.json so we can create a new preview directly

@delthas

delthas commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

/approve

@bert-e

bert-e commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

  • ✔️ development/9.4

  • ✔️ development/9.5

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

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

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

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

Goodbye delthas.

The following options are set: approve

@bert-e
bert-e merged commit 6ca94e4 into development/9.4 Jul 17, 2026
24 checks passed
@bert-e
bert-e deleted the improvement/BB-806/downgrade-node-rdkafka branch July 17, 2026 08:55
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.

Consumer returns NULL key/value for legacy MessageSet format (message.format.version < 0.11) since v2.5.0

4 participants