From 0d27d5a10ad62d506a646dcbf0a196e1d57740b0 Mon Sep 17 00:00:00 2001 From: Yiru Tang Date: Mon, 18 Oct 2021 09:22:11 -0700 Subject: [PATCH] fix: remove excessive StreamWriter info logging (#1359) Fixing an internal feedback bug: b/202883481 --- .../cloud/bigquery/storage/v1/StreamWriter.java | 14 +++++++------- .../bigquery/storage/v1beta2/StreamWriterV2.java | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java index 80a935ee93..3f94a85f03 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1/StreamWriter.java @@ -307,7 +307,7 @@ public void close() { } finally { this.lock.unlock(); } - log.info("Waiting for append thread to finish. Stream: " + streamName); + log.fine("Waiting for append thread to finish. Stream: " + streamName); try { appendThread.join(); log.info("User close complete. Stream: " + streamName); @@ -366,17 +366,17 @@ private void appendLoop() { } } - log.info("Cleanup starts. Stream: " + streamName); + log.fine("Cleanup starts. Stream: " + streamName); // At this point, the waiting queue is drained, so no more requests. // We can close the stream connection and handle the remaining inflight requests. this.streamConnection.close(); waitForDoneCallback(); // At this point, there cannot be more callback. It is safe to clean up all inflight requests. - log.info( + log.fine( "Stream connection is fully closed. Cleaning up inflight requests. Stream: " + streamName); cleanupInflightRequests(); - log.info("Append thread is done. Stream: " + streamName); + log.fine("Append thread is done. Stream: " + streamName); } /* @@ -396,7 +396,7 @@ private boolean waitingQueueDrained() { } private void waitForDoneCallback() { - log.info("Waiting for done callback from stream connection. Stream: " + streamName); + log.fine("Waiting for done callback from stream connection. Stream: " + streamName); while (true) { this.lock.lock(); try { @@ -441,7 +441,7 @@ private void cleanupInflightRequests() { } finally { this.lock.unlock(); } - log.info( + log.fine( "Cleaning " + localQueue.size() + " inflight requests with error: " @@ -471,7 +471,7 @@ private void requestCallback(AppendRowsResponse response) { } private void doneCallback(Throwable finalStatus) { - log.info( + log.fine( "Received done callback. Stream: " + streamName + " Final status: " diff --git a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java index 1d83af111e..43496f667b 100644 --- a/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java +++ b/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta2/StreamWriterV2.java @@ -307,7 +307,7 @@ public void close() { } finally { this.lock.unlock(); } - log.info("Waiting for append thread to finish. Stream: " + streamName); + log.fine("Waiting for append thread to finish. Stream: " + streamName); try { appendThread.join(); log.info("User close complete. Stream: " + streamName); @@ -366,17 +366,17 @@ private void appendLoop() { } } - log.info("Cleanup starts. Stream: " + streamName); + log.fine("Cleanup starts. Stream: " + streamName); // At this point, the waiting queue is drained, so no more requests. // We can close the stream connection and handle the remaining inflight requests. this.streamConnection.close(); waitForDoneCallback(); // At this point, there cannot be more callback. It is safe to clean up all inflight requests. - log.info( + log.fine( "Stream connection is fully closed. Cleaning up inflight requests. Stream: " + streamName); cleanupInflightRequests(); - log.info("Append thread is done. Stream: " + streamName); + log.fine("Append thread is done. Stream: " + streamName); } /* @@ -396,7 +396,7 @@ private boolean waitingQueueDrained() { } private void waitForDoneCallback() { - log.info("Waiting for done callback from stream connection. Stream: " + streamName); + log.fine("Waiting for done callback from stream connection. Stream: " + streamName); while (true) { this.lock.lock(); try { @@ -441,7 +441,7 @@ private void cleanupInflightRequests() { } finally { this.lock.unlock(); } - log.info( + log.fine( "Cleaning " + localQueue.size() + " inflight requests with error: " @@ -471,7 +471,7 @@ private void requestCallback(AppendRowsResponse response) { } private void doneCallback(Throwable finalStatus) { - log.info( + log.fine( "Received done callback. Stream: " + streamName + " Final status: "