Skip to content

Commit 39f1843

Browse files
committed
disable byte-based auto-flush by default
1 parent 1004eb2 commit 39f1843

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ final class LineSenderBuilder {
557557
private static final int DEFAULT_TCP_PORT = 9009;
558558
private static final int DEFAULT_UDP_PORT = 9007;
559559
private static final int DEFAULT_WEBSOCKET_PORT = 9000;
560-
private static final int DEFAULT_WS_AUTO_FLUSH_BYTES = 128 * 1024; // 128KB
560+
private static final int DEFAULT_WS_AUTO_FLUSH_BYTES = 0;
561561
private static final long DEFAULT_WS_AUTO_FLUSH_INTERVAL_NANOS = 100_000_000L; // 100ms
562562
private static final int DEFAULT_WS_AUTO_FLUSH_ROWS = 1_000;
563563
private static final int MIN_BUFFER_SIZE = AuthUtils.CHALLENGE_LEN + 1; // challenge size + 1;
@@ -731,7 +731,7 @@ public LineSenderBuilder asyncMode(boolean enabled) {
731731
* <br>
732732
* This is only used when communicating over WebSocket transport.
733733
* <br>
734-
* Default value is 128KB.
734+
* Default value is 0, which disables byte-based auto-flush.
735735
*
736736
* @param bytes maximum bytes per batch
737737
* @return this instance for method chaining

core/src/main/java/io/questdb/client/cutlass/qwp/client/QwpWebSocketSender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
* Configuration options:
6969
* <ul>
7070
* <li>{@code autoFlushRows} - Maximum rows per batch (default: 1000)</li>
71-
* <li>{@code autoFlushBytes} - Maximum bytes per batch (default: 128KB)</li>
71+
* <li>{@code autoFlushBytes} - Maximum bytes per batch (default: disabled)</li>
7272
* <li>{@code autoFlushIntervalNanos} - Maximum age before auto-flush (default: 100ms)</li>
7373
* </ul>
7474
* <p>
@@ -89,7 +89,7 @@
8989
*/
9090
public class QwpWebSocketSender implements Sender {
9191

92-
public static final int DEFAULT_AUTO_FLUSH_BYTES = 128 * 1024; // 128KB
92+
public static final int DEFAULT_AUTO_FLUSH_BYTES = 0;
9393
public static final long DEFAULT_AUTO_FLUSH_INTERVAL_NANOS = 100_000_000L; // 100ms
9494
public static final int DEFAULT_AUTO_FLUSH_ROWS = 1_000;
9595
public static final int DEFAULT_IN_FLIGHT_WINDOW_SIZE = 128;

0 commit comments

Comments
 (0)