Skip to content

Commit 6f2665f

Browse files
committed
chore: minor change
1 parent 6eb9848 commit 6f2665f

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

ingester-bulk-protocol/src/main/java/io/greptime/BulkWriteService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ public void close() throws Exception {
208208
}
209209

210210
private long nextId() {
211-
long id = this.idGenerator.incrementAndGet();
212-
if (id == 0) { // Skip ID 0 as it's reserved for special cases
211+
long id;
212+
do {
213213
id = this.idGenerator.incrementAndGet();
214-
}
214+
} while (id == 0); // Skip ID 0 as it's reserved for special cases
215215
return id;
216216
}
217217

ingester-example/src/main/java/io/greptime/bench/BulkWriteBenchmark.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static void main(String[] args) throws Exception {
4747
String endpoint = SystemPropertyUtil.get("db_endpoint", "127.0.0.1:4001");
4848
String dbName = SystemPropertyUtil.get("db_name", "public");
4949
boolean zstdCompression = SystemPropertyUtil.getBool("zstd_compression", false);
50-
int batchSize = SystemPropertyUtil.getInt("batch_size_per_request", 100 * 1024);
50+
int batchSize = SystemPropertyUtil.getInt("batch_size_per_request", 5 * 1024);
5151
LOG.info("Connect to db: {}, endpoint: {}", dbName, endpoint);
5252
LOG.info("Using zstd compression: {}", zstdCompression);
5353
LOG.info("Batch size: {}", batchSize);
@@ -62,7 +62,7 @@ public static void main(String[] args) throws Exception {
6262
.allocatorInitReservation(0)
6363
.allocatorMaxAllocation(4 * 1024 * 1024 * 1024L)
6464
.timeoutMsPerMessage(60000)
65-
.maxRequestsInFlight(8)
65+
.maxRequestsInFlight(32)
6666
.build();
6767
Compression compression = zstdCompression ? Compression.Zstd : Compression.None;
6868
Context ctx = Context.newDefault().withCompression(compression);

ingester-example/src/main/java/io/greptime/bench/RandomTableDataProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class RandomTableDataProvider implements TableDataProvider {
5252
.build();
5353
// Total number of rows to generate, configurable via system property
5454
// Default is 1 billion rows if not specified
55-
rowCount = SystemPropertyUtil.getLong("table_data_provider.row_count", 1_000_000_000L);
55+
rowCount = SystemPropertyUtil.getLong("table_data_provider.row_count", 1_000_000L);
5656
}
5757

5858
@Override

ingester-example/src/main/java/io/greptime/bench/StreamingWriteBenchmark.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static void main(String[] args) throws Exception {
4848
String endpoint = SystemPropertyUtil.get("db_endpoint", "127.0.0.1:4001");
4949
String dbName = SystemPropertyUtil.get("db_name", "public");
5050
boolean zstdCompression = SystemPropertyUtil.getBool("zstd_compression", false);
51-
int batchSize = SystemPropertyUtil.getInt("batch_size_per_request", 100 * 1024);
51+
int batchSize = SystemPropertyUtil.getInt("batch_size_per_request", 5 * 1024);
5252
int maxPointsPerSecond = SystemPropertyUtil.getInt("max_points_per_second", Integer.MAX_VALUE);
5353
LOG.info("Connect to db: {}, endpoint: {}", dbName, endpoint);
5454
LOG.info("Using zstd compression: {}", zstdCompression);

ingester-protocol/src/main/java/io/greptime/BulkWriteClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public CompletableFuture<Integer> writeNext() throws Exception {
218218
InnerMetricHelper.putTime().update(clock.duration(startCall), TimeUnit.MILLISECONDS);
219219
});
220220

221-
LOG.debug("Write request sent successfully, in-flight requests: {}", stage.numInFlight());
221+
LOG.info("Write request sent successfully, in-flight requests: {}", stage.numInFlight());
222222

223223
return future;
224224
});

0 commit comments

Comments
 (0)