Skip to content

refactor(qwp)!: rename sf_max_bytes to sf_max_segment_bytes#79

Open
mtopolnik wants to merge 1 commit into
mainfrom
mt_sf-max-segment-bytes
Open

refactor(qwp)!: rename sf_max_bytes to sf_max_segment_bytes#79
mtopolnik wants to merge 1 commit into
mainfrom
mt_sf-max-segment-bytes

Conversation

@mtopolnik

Copy link
Copy Markdown

Renames the store-and-forward connect-string key sf_max_bytes to sf_max_segment_bytes: the key caps a single SF segment, and the new name says so; it also pairs cleanly with sf_max_total_bytes. The public snake_case property SenderOptions.sf_max_bytes follows the key (nameof propagates the parse and UDP-reject sites); the WebSocketOnlyKeys array and QwpConnectStringKeys.IngressOnly literal key lists are renamed by hand so the WS-only guard and ToString() round-trip skip keep applying.

Breaking for 4.0.0-beta.1 consumers — accepted; beta compatibility is by policy not maintained, so this is a hard rename with no alias.

Part of the cross-repo rename of this key, matching questdb/java-questdb-client#70.

Not validated locally (no dotnet SDK on the machine that produced this) — CI must validate.

🤖 Generated with Claude Code

The connect-string key caps a single SF segment, and the new name says
so; it also pairs cleanly with sf_max_total_bytes. The public
SenderOptions property follows the key, and the WebSocket-only key
list, QWP key table, error messages, tests, and README rename in step
so the old spelling is gone entirely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@mtopolnik, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a2d105f1-45d3-4998-a1ae-ce578b38a14e

📥 Commits

Reviewing files that changed from the base of the PR and between d0162aa and 646c00d.

📒 Files selected for processing (8)
  • README.md
  • src/net-questdb-client-tests/QuestDbDockerIngestFaultToleranceTests.cs
  • src/net-questdb-client-tests/Qwp/QwpWebSocketSenderTests.cs
  • src/net-questdb-client-tests/SenderOptionsTests.cs
  • src/net-questdb-client/Qwp/QwpConnectStringKeys.cs
  • src/net-questdb-client/Qwp/Sf/QwpSegmentRing.cs
  • src/net-questdb-client/Senders/QwpWebSocketSender.cs
  • src/net-questdb-client/Utils/SenderOptions.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mt_sf-max-segment-bytes

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.

@mtopolnik

Copy link
Copy Markdown
Author

Review: PR #79

Overview

A pure mechanical rename of the store-and-forward connect-string key sf_max_bytessf_max_segment_bytes, including the public snake_case property on SenderOptions, the private field and its user-set flag, the two hand-maintained key lists, user-facing error messages, tests, and the README. No runtime behavior changes. Declared breaking (!) with no back-compat alias, matching the parallel Java client rename (java-questdb-client#70).

Correctness — verified complete ✅

  • No leftovers. A case-insensitive sweep for sf_max_bytes / sfMaxBytes across all .cs, .md, .yaml, .json files (excluding build output) returns zero hits. Code, tests, benchmarks, examples, and docs are all consistent on the new name.
  • All three key registries updated, which is where a rename like this typically breaks silently: the parse site (ParseLongWithDefault(nameof(sf_max_segment_bytes), ...), SenderOptions.cs:287), the BuildWebSocketOnlyKeys() literal list (SenderOptions.cs:928, drives both the string-ctor WS-only rejection and the ToString() skip), and QwpConnectStringKeys.IngressOnly (QwpConnectStringKeys.cs:67).
  • ToString() round-trip holds. ToString() emits keys by reflected public property name and consults WebSocketOnlyKeys by prop.Name (SenderOptions.cs:2308-2311); since the property, the parse nameof, and the literal list all moved together, emit → re-parse stays consistent.
  • Clean failure mode for un-migrated configs. A beta.1 user still passing sf_max_bytes hits RejectUnknownConnectStringKeys and gets Unknown connect-string key 'sf_max_bytes' as a ConfigError at construction (SenderOptions.cs:385-393) — fail-fast, not silently ignored. That makes the no-alias hard rename safe in practice.
  • User-facing messages updated in both places they exist: the three validation errors in ValidateStoreAndForwardOptions and the oversized-frame hint in QwpSegmentRing.TryAppend (QwpSegmentRing.cs:328).

Test coverage ✅

  • All test config strings and assertions migrated, including the two tests that pin the error-message content (Message.Contains("sf_max_segment_bytes")) — those would have caught a missed error-string rename.
  • Test method names renamed to match (SfMaxSegmentBytes_NonPositive_Rejected, SfMaxTotalBytes_LessThanTwiceSfMaxSegmentBytes_Rejected). These don't intersect the CI's FQN suite filters, so no pipeline impact.
  • Sf_AllKeysOnHttpScheme_RejectedIndividually still exercises the new key against the WS-only guard, so the registry update is itself under test.

Nits

  • README table padding (README.md:315): the renamed cell kept the old column's trailing-space width, so the raw-markdown pipe alignment of that row is off relative to its neighbors. Renders fine on GitHub; trim if you touch the file again.

Verdict: approve. Complete, consistent, well-scoped rename with the right failure mode for stale configs; nothing blocking.

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