Skip to content

fix: add bulk write timeout diagnostics#103

Open
v0y4g3r wants to merge 4 commits into
mainfrom
fix/bulk-write-timeout-logging
Open

fix: add bulk write timeout diagnostics#103
v0y4g3r wants to merge 4 commits into
mainfrom
fix/bulk-write-timeout-logging

Conversation

@v0y4g3r

@v0y4g3r v0y4g3r commented Jul 13, 2026

Copy link
Copy Markdown

Summary

  • log table name, request ID, row count, and timeout when BulkStreamWriter writes time out
  • deduplicate caller-side and internal deadline timeout diagnostics
  • publish the project as 0.15.1-SNAPSHOT with Central plugin 0.11.0 and a guarded manual workflow

Test Plan

  • mvn test
  • mvn spotless:check
  • JAVA_HOME=... mvn -P release -DskipTests -Dgpg.skip=true clean verify
  • verify manual publishing rejects non-SNAPSHOT versions

Copilot AI review requested due to automatic review settings July 13, 2026 09:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request improves bulk write timeout diagnostics by logging request context (table, request ID, row count, timeout) and deduplicating timeout reporting between caller-side waits and internal deadline enforcement. It also bumps the project version to the next snapshot and tightens publishing workflow behavior for manual runs.

Changes:

  • Add timeout-context logging and deduplication in the bulk write pipeline (BulkWriteService, BulkWriteClient).
  • Add tests validating caller-timeout logging propagation and “log once” behavior.
  • Bump Maven versions to 0.15.1-SNAPSHOT, update Central publishing plugin, and add guarded manual publishing workflow dispatch.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Bumps project version and updates Central publishing plugin version.
ingester-rpc/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-protocol/src/main/java/io/greptime/BulkWriteClient.java Wraps bulk write futures to log caller-side timeouts with request context.
ingester-protocol/src/test/java/io/greptime/BulkWriteClientTest.java Adds unit test ensuring timed get(...) reports timeout to the put stage.
ingester-protocol/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-prometheus-metrics/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-integration-tests/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-grpc/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-example/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-common/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-bulk-protocol/src/main/java/io/greptime/BulkWriteService.java Adds table-name-aware timeout diagnostics and deduplicates deadline vs caller timeout logs.
ingester-bulk-protocol/src/main/java/io/greptime/BulkWriteManager.java Passes table name into BulkWriteService for diagnostics.
ingester-bulk-protocol/src/test/java/io/greptime/BulkWriteServiceTest.java Adds test ensuring request-context timeout log is emitted only once.
ingester-bulk-protocol/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
ingester-all/pom.xml Aligns module parent version to 0.15.1-SNAPSHOT.
.github/workflows/mvn_publish.yml Adds manual workflow dispatch and rejects manual publishes for non--SNAPSHOT versions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +290 to +314
static class TimeoutLoggingFuture extends CompletableFuture<Integer> {
private final BulkWriteService.PutStage putStage;

TimeoutLoggingFuture(CompletableFuture<Integer> delegate, BulkWriteService.PutStage putStage) {
this.putStage = putStage;
delegate.whenComplete((r, t) -> {
if (t == null) {
complete(r);
} else {
completeExceptionally(t);
}
});
}

@Override
public Integer get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
try {
return super.get(timeout, unit);
} catch (TimeoutException e) {
this.putStage.logTimeout(e, timeout, unit);
throw e;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants