fix: add bulk write timeout diagnostics#103
Open
v0y4g3r wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
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; | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan
mvn testmvn spotless:checkJAVA_HOME=... mvn -P release -DskipTests -Dgpg.skip=true clean verify