Skip to content

Commit 627327b

Browse files
mtopolnikclaude
andcommitted
Name the segment-size setter parameter for its unit
storeAndForwardMaxSegmentBytes still took a parameter called maxBytes, which reads as the total cap and reintroduces exactly the ambiguity the sf_max_segment_bytes rename removes. Every sibling names its parameter after the method tail: storeAndForwardMaxTotalBytes takes maxTotalBytes, storeAndForwardDir takes dir, storeAndForwardDurability takes durability, storeAndForwardSyncIntervalMillis takes millis. The parameter is now maxSegmentBytes. Signature, the positivity guard, the exception text argument, and the field assignment all follow. No behavior changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent a750e1a commit 627327b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

core/src/main/java/io/questdb/client/Sender.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2775,14 +2775,14 @@ public LineSenderBuilder storeAndForwardDurability(SfDurability durability) {
27752775
* (4 MiB). Smaller segments mean faster trim of acked data; larger
27762776
* segments mean fewer rotations.
27772777
*/
2778-
public LineSenderBuilder storeAndForwardMaxSegmentBytes(long maxBytes) {
2778+
public LineSenderBuilder storeAndForwardMaxSegmentBytes(long maxSegmentBytes) {
27792779
if (protocol != PARAMETER_NOT_SET_EXPLICITLY && protocol != PROTOCOL_WEBSOCKET) {
27802780
throw new LineSenderException("store_and_forward is only supported for WebSocket transport");
27812781
}
2782-
if (maxBytes <= 0) {
2783-
throw new LineSenderException("sf_max_segment_bytes must be positive: ").put(maxBytes);
2782+
if (maxSegmentBytes <= 0) {
2783+
throw new LineSenderException("sf_max_segment_bytes must be positive: ").put(maxSegmentBytes);
27842784
}
2785-
this.sfMaxSegmentBytes = maxBytes;
2785+
this.sfMaxSegmentBytes = maxSegmentBytes;
27862786
return this;
27872787
}
27882788

0 commit comments

Comments
 (0)