Skip to content

fix: improve discoverability of partition_autobalancing_mode and redpanda_memory_allocated_memory#1656

Merged
micheleRP merged 4 commits intoredpanda-data:mainfrom
franrob-projects:fix/partition-autobalancing-mode-discoverability
Apr 28, 2026
Merged

fix: improve discoverability of partition_autobalancing_mode and redpanda_memory_allocated_memory#1656
micheleRP merged 4 commits intoredpanda-data:mainfrom
franrob-projects:fix/partition-autobalancing-mode-discoverability

Conversation

@franrob-projects
Copy link
Copy Markdown
Contributor

@franrob-projects franrob-projects commented Apr 6, 2026

Summary

Addresses two issues where users reported finding no search results for configuration and metrics properties that are documented but not easily discoverable.

Closes #1508
Closes #1503


partition_autobalancing_mode (cluster-balancing.adoc)

The property was referenced only as an xref to the reference partial, with no anchor on the manage-side page itself. Users searching for partition_autobalancing_mode landed nowhere actionable.

Changes:

  • Added [[partition_autobalancing_mode]] anchor directly to the Partition balancing settings section, making it reachable by URL fragment and indexed by site search
  • Added rpk cluster config get and rpk cluster config set commands so users know immediately how to inspect and change the value
  • Clarified the default-value story: node_add without an enterprise license, continuous with one

redpanda_memory_allocated_memory (public-metrics-reference.adoc)

The original entry was two sentences. Users trying to understand what this metric measures — particularly why it can read high without the system being under memory pressure — had no explanation.

Changes:

  • Explained that the metric includes reclaimable batch cache memory, which is why values can appear high
  • Clarified when to use this metric vs redpanda_memory_available_memory
  • Added two PromQL example queries: per-shard view and aggregated per-broker view

Checks

  • Small fix (no new features, no new pages)
  • Content gap / support follow-up

Preview pages

…anda_memory_allocated_memory

Closes redpanda-data#1508
Closes redpanda-data#1503

partition_autobalancing_mode (cluster-balancing.adoc):
- Added explicit [[partition_autobalancing_mode]] anchor to the
  Partition balancing settings section so the property is reachable
  by URL fragment and indexed by site search
- Added rpk commands showing how to get and set the property
- Clarified that node_add is the default without an enterprise license
  and continuous is the default with one

redpanda_memory_allocated_memory (public-metrics-reference.adoc):
- Expanded the entry to explain why the metric can appear high even
  without memory pressure (batch cache inclusion)
- Clarified when to use this metric vs redpanda_memory_available_memory
- Added example PromQL queries for per-shard and per-broker views
@franrob-projects franrob-projects requested a review from a team as a code owner April 6, 2026 11:31
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 6, 2026

Deploy Preview for redpanda-docs-preview ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3c4dc91
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/69f0e46adccf5c00084eb886
😎 Deploy Preview https://deploy-preview-1656--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 6, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 91384c78-83cb-4109-84c3-4780698eae36

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
📝 Walkthrough

Walkthrough

This pull request updates documentation across two AsciiDoc files to address gaps in searchability and clarity. The first change expands the partition_autobalancing_mode cluster property documentation by adding operational CLI commands (rpk cluster config get/set) and clarifying the behavior and licensing requirements of different balancing modes. The second change updates the definition of the redpanda_memory_allocated_memory metric and includes concrete Prometheus query examples for monitoring CPU shard memory allocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • micheleRP
  • joe-redpanda
  • Feediver1
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main changes: improving discoverability of two specific configuration/metric properties mentioned throughout the changeset.
Linked Issues check ✅ Passed The PR directly addresses both linked issues by adding searchable anchors and expanded explanations for partition_autobalancing_mode [#1508] and redpanda_memory_allocated_memory [#1503].
Out of Scope Changes check ✅ Passed All changes are directly scoped to resolving discoverability issues in documentation for the two properties mentioned in the linked issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description is well-structured and complete. It addresses the template requirements by providing a clear summary, resolving linked issues, explicitly marking applicable checks (Small fix and Content gap), and including preview page links.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@modules/reference/pages/public-metrics-reference.adoc`:
- Around line 892-900: The docs are inconsistent: update the monitoring page
text in monitor-health.adoc to match the new definition that
redpanda_memory_allocated_memory includes reclaimable batch cache memory; change
the wording where it currently states allocated memory excludes reclaimable
cache to instead state it includes reclaimable batch cache memory and update any
alerting guidance/examples to recommend using redpanda_memory_available_memory
for measuring actual free memory (and adjust any formulas that presumed
allocated excluded reclaimable memory).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dd0fc0f5-38cb-489d-b45f-80331fe70480

📥 Commits

Reviewing files that changed from the base of the PR and between c4f9842 and 1ac1ad6.

📒 Files selected for processing (2)
  • modules/manage/pages/cluster-maintenance/cluster-balancing.adoc
  • modules/reference/pages/public-metrics-reference.adoc

Comment thread modules/reference/pages/public-metrics-reference.adoc Outdated
franrob-projects added a commit to franrob-projects/portfolio that referenced this pull request Apr 21, 2026
- Add TeachYAR and GibTrain (Gibraltar Compliance) project cards.
  Extend Project interface with an optional live URL and a "Live site"
  button. GibTrain links to its GitHub Pages deployment.

- Add "Open-source contributions" subsection listing five docs PRs:
  graphprotocol/docs#1096, open-telemetry/opentelemetry.io#9711,
  redpanda-data/docs#1656, OWASP/CheatSheetSeries#2101 and #2100.
  Styled with repo code-tag, state pill, and PR number.

- Home page copy: "Tech writer" -> "All things docs",
  "My writer journey" -> "My journey".

- Expand the Ably entry with the docs re-engineering work
  (Textile -> Next.js + TypeScript + React) and link the two merged
  MDX conversion PRs: ably/docs#2911 (REST API) and #2913 (SSE).

- Expand docs/ably/index.md with a new "Re-engineering the docs site"
  section plus images across SSE, webhooks, pub/sub, troubleshooting,
  and architecture. Add a troubleshooting subsection linking
  ably/docs#2984 (HAR file guide) and #2818 (service disruptions).

- Rename static/img/ably/ably-troubleshooting/ (drop the trailing
  space in the directory name that was breaking image references).

- Remove em-dashes from site content (projects page, 3 blog post
  alt-texts) using contextual substitutions: colons for titles and
  list intros, commas/periods for mid-sentence pauses, parens for a
  parenthetical, pipe for the HTML page title.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@micheleRP micheleRP left a comment

Choose a reason for hiding this comment

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

Final review pass

Files reviewed: 2 .adoc files
Overall: Small, focused discoverability fix that cleanly addresses both linked issues. One cross-page inconsistency (flagged by CodeRabbit) is worth resolving before merge, plus a few minor style nits.

Issue alignment

Closes #1508 and #1503 — both addressed:

  • #1508 — property now has a stable URL fragment plus actionable rpk commands on the management page.
  • #1503 — metric now explains what kind of memory it measures (including reclaimable batch cache) and points to redpanda_memory_available_memory for pressure monitoring.

Critical — cross-page inconsistency

modules/manage/partials/monitor-health.adoc:65 (not in this PR) contradicts the new definition:

  • public-metrics-reference.adoc:892 (new): "…includes memory in the batch cache that has been allocated but could be reclaimed."
  • monitor-health.adoc:65 (existing): "…since allocated does not include reclaimable cache memory."

The PR's definition is the correct one — the formulas right below on monitor-health.adoc (available / (free + allocated)) only make numeric sense if allocated includes reclaimable batch cache. The old wording was already wrong; this PR just makes the contradiction more visible.

Fix: Either update monitor-health.adoc:65 in this PR, or open a follow-up and link it from the PR description. This is the same issue CodeRabbit flagged on its inline comment — it's a valid finding.

Suggestions

  1. cluster-balancing.adoc:123 — back-to-back repetition of "enterprise license."

    • Current: "This is the default setting for clusters with an enterprise license. It requires an enterprise license."
    • Suggested: "This is the default setting for clusters with an enterprise license, which it requires."
    • The auto-generated cluster-properties.adoc partial already has a NOTE explaining license-based defaults, so no need to over-explain here.
  2. public-metrics-reference.adoc:900 — same-page xref could be a shortcut reference.

    • Current: xref:reference:public-metrics-reference.adoc#redpanda_memory_available_memory[`redpanda_memory_available_memory`]
    • Suggested: <<redpanda_memory_available_memory,`redpanda_memory_available_memory`>>
    • Style only; the full xref works. Shortcut form is idiomatic for same-page anchors.
  3. public-metrics-reference.adoc:902–907 — the first PromQL block is just the bare metric name. "Query Prometheus directly" oversells a block that contains only redpanda_memory_allocated_memory.

    • Suggested: Reframe as "To see raw per-shard values," or fold the per-shard example into the surrounding sentence and keep only the sum by (instance) query in a code block.

Impact on other files

  • modules/manage/partials/monitor-health.adoc — see critical finding above.
  • Nav — both pages already in modules/ROOT/nav.adoc (lines 165, 305). No change needed.
  • Existing deep links to cluster-balancing.adoc — all target #intra-broker-partition-balancing; the new anchor doesn't collide.
  • No What's New / release-notes entry needed — discoverability fix, not a feature.

What works well

  • Fixes a genuine pre-existing error on cluster-balancing.adoc:116: "Redpanda allocates brokers to random healthy brokers" → "Redpanda allocates partitions to random healthy brokers."
  • License-based default story on the manage page now matches the auto-generated cluster-properties.adoc NOTE block.
  • Bidirectional pointers between redpanda_memory_allocated_memory and redpanda_memory_available_memory help readers pick the right metric.
  • [[partition_autobalancing_mode]] anchor is placed above the section header, giving a stable URL fragment independent of the section title.

@micheleRP
Copy link
Copy Markdown
Contributor

@franrob-projects thank you for this PR! I'll have an SME review the final version, but we do have some initial suggestions we can implement. Would you like to review these, or do you want me to take it over from here?

micheleRP and others added 2 commits April 28, 2026 09:00
- Align monitor-health.adoc memory paragraph with the corrected
  redpanda_memory_allocated_memory definition (allocated includes
  reclaimable batch cache memory).
- Collapse repeated "enterprise license" sentence in the
  partition_autobalancing_mode continuous row.
- Use shortcut xref for the same-page redpanda_memory_available_memory
  link and tighten the per-shard PromQL lead-in.
- Lowercase "intra-broker partition balancing" in the overview table.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e continuous row

Splits the back-reference clause into two sentences to remove ambiguity
about what "which" refers to.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
=== redpanda_memory_allocated_memory

Total memory allocated (in bytes) per CPU shard.
Total memory allocated (in bytes) per CPU shard. This includes all memory currently held by Redpanda on that shard, including memory in the batch cache that has been allocated but could be reclaimed.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: that could be reclaimed if needed.

@micheleRP micheleRP merged commit e9bf2e1 into redpanda-data:main Apr 28, 2026
7 checks passed
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.

No search results for partition_autobalancing_mode No search results for redpanda_memory_allocated_memory

4 participants