Skip to content

Commit 745ceb4

Browse files
authored
feat: add two fine logs that would allow Datastream to look into the stuck issue (#1791)
1 parent 18f93c1 commit 745ceb4

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/ConnectionWorker.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,12 @@ private void appendLoop() {
488488
// TODO: Handle NOT_ENOUGH_QUOTA.
489489
// In the close case, the request is in the inflight queue, and will either be returned
490490
// to the user with an error, or will be resent.
491+
log.fine(
492+
"Sending "
493+
+ originalRequestBuilder.getProtoRows().getRows().getSerializedRowsCount()
494+
+ " rows to stream '"
495+
+ originalRequestBuilder.getWriteStream()
496+
+ "'");
491497
this.streamConnection.send(originalRequestBuilder.build());
492498
}
493499
}
@@ -580,6 +586,13 @@ private void cleanupInflightRequests() {
580586
}
581587

582588
private void requestCallback(AppendRowsResponse response) {
589+
log.fine(
590+
"Got response on stream '"
591+
+ response.getWriteStream()
592+
+ "' "
593+
+ (response.hasError()
594+
? "error: " + response.getError()
595+
: "offset: " + response.getAppendResult().getOffset().getValue()));
583596
AppendRequestAndResponse requestWrapper;
584597
this.lock.lock();
585598
if (response.hasUpdatedSchema()) {

0 commit comments

Comments
 (0)