Skip to content

OCPBUGS-100390: 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

OCPBUGS-100390: 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 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.

@sdodson sdodson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. staff-eng-approved Indicates a release branch PR has been approved by a staff engineer (formerly group/pillar lead). backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. labels Jul 31, 2026
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: redhat-chai-bot

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

The pull request process is described 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

@sdodson

sdodson commented Jul 31, 2026

Copy link
Copy Markdown
Member

/jira cherry-pick OCPBUGS-76329

@openshift-ci-robot

Copy link
Copy Markdown

@sdodson: Jira Issue OCPBUGS-76329 has been cloned as Jira Issue OCPBUGS-100390. Will retitle bug to link to clone.
/retitle OCPBUGS-100390: UPSTREAM: 21443: Revert "Reuse events between sync loops"

Details

In response to this:

/jira cherry-pick OCPBUGS-76329

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot changed the title UPSTREAM: 21443: Revert "Reuse events between sync loops" OCPBUGS-100390: UPSTREAM: 21443: Revert "Reuse events between sync loops" Jul 31, 2026
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Jul 31, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@redhat-chai-bot: This pull request references Jira Issue OCPBUGS-100390, which is invalid:

  • expected dependent Jira Issue OCPBUGS-76329 to be in one of the following states: VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA), but it is ON_QA instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

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

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 openshift-eng/jira-lifecycle-plugin repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. staff-eng-approved Indicates a release branch PR has been approved by a staff engineer (formerly group/pillar lead).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants