Skip to content

Commit 558a70c

Browse files
mtopolnikclaude
andcommitted
Document the WebSocket-only constraint on segment size
The storeAndForwardMaxSegmentBytes javadoc omitted the "WebSocket transport only" sentence that storeAndForwardDir, storeAndForwardDurability and storeAndForwardMaxTotalBytes all carry, even though the setter throws for HTTP, TCP and UDP. The javadoc now states that constraint, names sf_max_segment_bytes so a reader can connect the builder method to the connect-string key, and documents the parameter. It gives the default as a plain 4 MiB rather than as DEFAULT_SEGMENT_BYTES, a private constant that resolves to nothing in published javadoc. The paragraph is re-flowed to the surrounding width. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 627327b commit 558a70c

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,10 +2770,12 @@ public LineSenderBuilder storeAndForwardDurability(SfDurability durability) {
27702770
}
27712771

27722772
/**
2773-
* Maximum bytes per segment file before rotation. Defaults to
2774-
* {@code DEFAULT_SEGMENT_BYTES}
2775-
* (4 MiB). Smaller segments mean faster trim of acked data; larger
2776-
* segments mean fewer rotations.
2773+
* Maximum bytes per segment file before rotation, the builder form of
2774+
* the {@code sf_max_segment_bytes} connect-string key. Smaller segments
2775+
* mean faster trim of acked data; larger segments mean fewer rotations.
2776+
* Default: {@code 4 MiB}. WebSocket transport only.
2777+
*
2778+
* @param maxSegmentBytes per-segment cap in bytes; must be positive
27772779
*/
27782780
public LineSenderBuilder storeAndForwardMaxSegmentBytes(long maxSegmentBytes) {
27792781
if (protocol != PARAMETER_NOT_SET_EXPLICITLY && protocol != PROTOCOL_WEBSOCKET) {

0 commit comments

Comments
 (0)