File tree Expand file tree Collapse file tree
main/java/io/questdb/client/cutlass/qwp/client
test/java/io/questdb/client/test/cutlass/line/tcp/v4 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1298,9 +1298,13 @@ private void sealAndSwapBuffer() {
12981298 */
12991299 private void sendRow () {
13001300 ensureConnected ();
1301- long bytesBefore = currentTableBuffer .getBufferedBytes ();
1302- currentTableBuffer .nextRow ();
1303- pendingBytes += currentTableBuffer .getBufferedBytes () - bytesBefore ;
1301+ if (autoFlushBytes > 0 ) {
1302+ long bytesBefore = currentTableBuffer .getBufferedBytes ();
1303+ currentTableBuffer .nextRow ();
1304+ pendingBytes += currentTableBuffer .getBufferedBytes () - bytesBefore ;
1305+ } else {
1306+ currentTableBuffer .nextRow ();
1307+ }
13041308
13051309 // Both modes: accumulate rows, don't encode yet
13061310 if (pendingRowCount == 0 ) {
Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ private static Sender createSender(
209209 .address (host )
210210 .port (port );
211211 if (batchSize > 0 ) wsBuilder .autoFlushRows (batchSize );
212- if (flushBytes > 0 ) wsBuilder .autoFlushBytes (flushBytes );
212+ if (flushBytes >= 0 ) wsBuilder .autoFlushBytes (flushBytes );
213213 if (flushIntervalMs > 0 ) wsBuilder .autoFlushIntervalMillis ((int ) flushIntervalMs );
214214 if (inFlightWindow > 0 ) wsBuilder .inFlightWindowSize (inFlightWindow );
215215 return wsBuilder .build ();
You can’t perform that action at this time.
0 commit comments