Skip to content

UPSTREAM: 21443: Revert "Reuse events between sync loops" - #394

Open
redhat-chai-bot wants to merge 1 commit into
openshift:openshift-4.21from
redhat-chai-bot:cherry-pick-memory-fix-4.21
Open

UPSTREAM: 21443: Revert "Reuse events between sync loops"#394
redhat-chai-bot wants to merge 1 commit into
openshift:openshift-4.21from
redhat-chai-bot:cherry-pick-memory-fix-4.21

Conversation

@redhat-chai-bot

Copy link
Copy Markdown

Cherry-pick: etcd memory regression fix for 4.21

Cherry-pick of upstream etcd-io/etcd#21443 — Revert "Reuse events between sync loops"

Problem

etcd 3.6 introduced a memory regression that scales with cluster size (OCPBUGS-76329). The rangeEventsWithReuse optimization held event objects across sync loops, causing unbounded memory growth:

Cluster Size etcd 3.5 Max RSS etcd 3.6 Max RSS Max Change
24 nodes 468 MiB 541 MiB +15.6%
120 nodes 893 MiB 1.24 GiB +42.2%
250 nodes 1.13 GiB 2.96 GiB +162%

Fix

This cherry-picks the upstream revert which:

  • Removes the rangeEventsWithReuse function
  • Removes the shared evs variable from syncWatchersLoop
  • Restores the original rangeEvents and kvsToEvents signatures with contains filtering

Why cherry-pick instead of full rebase

OCP 4.21 etcd is on 3.6.5. A full rebase to 3.6.9+ is complicated by Go version constraints (see openshift/etcd#377 which is held). This targeted cherry-pick addresses the critical memory regression without introducing other changes.

Build and test verification

  • go build ./...
  • go test ./server/storage/mvcc/... ✅ (11.7s)

References


@sdodson requested in Slack thread

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 60313b36-dcad-4278-9091-502d80444ce1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from hasbro17 and tjungblu July 30, 2026 23:19
@openshift-ci

openshift-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: redhat-chai-bot
Once this PR has been reviewed and has the lgtm label, please assign dusk125 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

@redhat-chai-bot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/upstream-integration 0ff063b link false /test upstream-integration
ci/prow/upstream-e2e 0ff063b link false /test upstream-e2e

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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