Skip to content

Commit

Permalink
feat: add two fine logs that would allow Datastream to look into the …
Browse files Browse the repository at this point in the history
…stuck issue (#1791)
  • Loading branch information
yirutang committed Sep 22, 2022
1 parent 18f93c1 commit 745ceb4
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -488,6 +488,12 @@ private void appendLoop() {
// TODO: Handle NOT_ENOUGH_QUOTA.
// In the close case, the request is in the inflight queue, and will either be returned
// to the user with an error, or will be resent.
log.fine(
"Sending "
+ originalRequestBuilder.getProtoRows().getRows().getSerializedRowsCount()
+ " rows to stream '"
+ originalRequestBuilder.getWriteStream()
+ "'");
this.streamConnection.send(originalRequestBuilder.build());
}
}
Expand Down Expand Up @@ -580,6 +586,13 @@ private void cleanupInflightRequests() {
}

private void requestCallback(AppendRowsResponse response) {
log.fine(
"Got response on stream '"
+ response.getWriteStream()
+ "' "
+ (response.hasError()
? "error: " + response.getError()
: "offset: " + response.getAppendResult().getOffset().getValue()));
AppendRequestAndResponse requestWrapper;
this.lock.lock();
if (response.hasUpdatedSchema()) {
Expand Down

0 comments on commit 745ceb4

Please sign in to comment.