Skip to content

docs(topic): document topic-level offloadPolicies and unlimited backlog#409

Merged
freeznet merged 1 commit into
mainfrom
claude/dreamy-rhodes-bd4609
May 29, 2026
Merged

docs(topic): document topic-level offloadPolicies and unlimited backlog#409
freeznet merged 1 commit into
mainfrom
claude/dreamy-rhodes-bd4609

Conversation

@freeznet
Copy link
Copy Markdown
Member

@freeznet freeznet commented May 28, 2026

Motivation

A user asked whether the Pulsar Resources Operator supports declarative topic-level offload (offloadThresholdBytes, offloadDeletionLagSeconds) and an unlimited backlog quota (backlogQuotaLimitBytes: -1) via the PulsarTopic CRD. The code already supports all three (via OffloadPolicies and backlogQuotaLimitSize, wired through SetOffloadPolicies / SetBacklogQuota in pkg/admin/impl.go and pkg/connection/reconcile_topic.go), but the docs only listed offloadPolicies in the field table with no subfield reference or example — so the feature was effectively undiscoverable.

While auditing the same doc against the API types, a few other small inconsistencies surfaced (wrong default for persistent, missing -1 semantics for backlogQuotaLimitSize, stale modifiable-fields list, a duplicated/typo heading). Folded those in.

Modifications

docs/pulsar_topic.md only — no code or API changes.

  • New offloadPolicies subsection under "Topic-Level Policies": a 14-field table mirroring the OffloadPolicies Go type, plus a worked example matching the common "aggressive immediate offload" use case (managedLedgerOffloadThresholdInBytes: 0 + managedLedgerOffloadDeletionLagInMillis: 60000 + backlogQuotaLimitSize: "-1"), plus a mapping from familiar pulsar-admin flag names to CR fields. Calls out the millis-vs-seconds gotcha for the deletion lag.
  • backlogQuotaLimitSize field row now documents "-1" as "unlimited backlog (no producer throttling)".
  • persistent default corrected: falsetrue (matches +kubebuilder:default=true on PulsarTopicSpec.Persistent). Also clarified that the topic-domain prefix in name takes precedence.
  • "Update A Pulsar Topic" modifiable-fields list refreshed to include offloadPolicies, backlogQuotaType, subscribeRate, subscriptionDispatchRate, replicatorDispatchRate, maxMessageSize, maxConsumersPerSubscription, maxSubscriptionsPerTopic, maxUnAckedMessagesPerConsumer/Subscription, deduplication, deduplicationSnapshotInterval, autoSubscriptionCreation, schemaValidationEnforced, schemaCompatibilityStrategy, and properties. Added a note that clearing an optional field reverts to the namespace-level default.
  • Comprehensive example at the bottom of the doc gained an offloadPolicies block and a corresponding bullet in the feature list.
  • Dropped the duplicated/typo ## Sepcifications heading.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial rework / code cleanup without any test coverage. Docs-only change — the operator behavior was already covered by existing reconciler tests; no code path is modified.

Documentation

  • doc

🤖 Generated with Claude Code

The PulsarTopic CRD has supported topic-level offloadPolicies and
backlogQuotaLimitSize since the OffloadPolicies type was added, and the
reconciler wires them through SetOffloadPolicies / SetBacklogQuota. The
docs only listed offloadPolicies in the field table with no subfield
documentation, so users had no way to discover that aggressive immediate
offload (offloadThresholdBytes=0 / offloadDeletionLagSeconds=60) and
unlimited backlog (backlogQuotaLimitBytes=-1) are already expressible
declaratively per topic.

This change documents the gap without touching code:

- Add a dedicated offloadPolicies subsection covering all 14 fields,
  with an example matching the common "aggressive immediate offload"
  use case and a mapping note from pulsar-admin flag names to CR fields
  (including the millis-vs-seconds gotcha for the deletion lag).
- Document that backlogQuotaLimitSize: "-1" allows an unlimited backlog
  without producer throttling.
- Fix the persistent default in the field table (true, not false) and
  clarify that the topic-domain prefix in name takes precedence.
- Refresh the modifiable-fields list in "Update A Pulsar Topic" to
  include offloadPolicies, the subscribe/replicator dispatch rates,
  the per-subscription/per-topic limits, deduplication settings,
  schema controls, and properties; note that clearing a field reverts
  to the namespace-level default.
- Extend the comprehensive example with an offloadPolicies block.
- Drop the duplicated/typo "## Sepcifications" heading.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 28, 2026 14:27
@freeznet freeznet requested review from a team as code owners May 28, 2026 14:27
@github-actions github-actions Bot added the doc This pr contains a document label May 28, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This docs-only PR makes existing PulsarTopic support for topic-level offload policies and unlimited backlog quota discoverable, while correcting related field documentation.

Changes:

  • Documents offloadPolicies fields, examples, and pulsar-admin field mappings.
  • Clarifies backlogQuotaLimitSize: "-1" and corrects the persistent default to true.
  • Refreshes the topic update guidance and comprehensive example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@freeznet freeznet merged commit 9c756f8 into main May 29, 2026
6 checks passed
@freeznet freeznet deleted the claude/dreamy-rhodes-bd4609 branch May 29, 2026 14:51
freeznet added a commit that referenced this pull request Jun 2, 2026
…og (#409)

The PulsarTopic CRD has supported topic-level offloadPolicies and
backlogQuotaLimitSize since the OffloadPolicies type was added, and the
reconciler wires them through SetOffloadPolicies / SetBacklogQuota. The
docs only listed offloadPolicies in the field table with no subfield
documentation, so users had no way to discover that aggressive immediate
offload (offloadThresholdBytes=0 / offloadDeletionLagSeconds=60) and
unlimited backlog (backlogQuotaLimitBytes=-1) are already expressible
declaratively per topic.

This change documents the gap without touching code:

- Add a dedicated offloadPolicies subsection covering all 14 fields,
  with an example matching the common "aggressive immediate offload"
  use case and a mapping note from pulsar-admin flag names to CR fields
  (including the millis-vs-seconds gotcha for the deletion lag).
- Document that backlogQuotaLimitSize: "-1" allows an unlimited backlog
  without producer throttling.
- Fix the persistent default in the field table (true, not false) and
  clarify that the topic-domain prefix in name takes precedence.
- Refresh the modifiable-fields list in "Update A Pulsar Topic" to
  include offloadPolicies, the subscribe/replicator dispatch rates,
  the per-subscription/per-topic limits, deduplication settings,
  schema controls, and properties; note that clearing a field reverts
  to the namespace-level default.
- Extend the comprehensive example with an offloadPolicies block.
- Drop the duplicated/typo "## Sepcifications" heading.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc This pr contains a document

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants