Skip to content

Commit fe25f38

Browse files
fix: Reduce timeout of waiting in queue from 15 minutes to 5 minutes and rephrase the log a bit (#2084)
* feat: add public api to stream writer to set the maximum wait time * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * modify back the readme change from owl post processor * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: Reduce the timeout to 5 minutes for the requests wait time in queue. Since in write api server side we have total timeout of 2 minutes, it does not make sense to wait 15 minutes to determine whether we have met dead connection, let's reduce the timeout here * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 4fc8286 commit fe25f38

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If you are using Maven without the BOM, add this to your dependencies:
5050
If you are using Gradle 5.x or later, add this to your dependencies:
5151

5252
```Groovy
53-
implementation platform('com.google.cloud:libraries-bom:26.12.0')
53+
implementation platform('com.google.cloud:libraries-bom:26.13.0')
5454
5555
implementation 'com.google.cloud:google-cloud-bigquerystorage'
5656
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class ConnectionWorker implements AutoCloseable {
7575
* We will constantly checking how much time we have been waiting for the next request callback
7676
* if we wait too much time we will start shutting down the connections and clean up the queues.
7777
*/
78-
static Duration MAXIMUM_REQUEST_CALLBACK_WAIT_TIME = Duration.ofMinutes(15);
78+
static Duration MAXIMUM_REQUEST_CALLBACK_WAIT_TIME = Duration.ofMinutes(5);
7979

8080
private Lock lock;
8181
private Condition hasMessageInWaitingQueue;
@@ -321,7 +321,7 @@ public void run() {
321321
}
322322

323323
private void resetConnection() {
324-
log.info("Reconnecting for stream:" + streamName + " id: " + writerId);
324+
log.info("Start connecting stream: " + streamName + " id: " + writerId);
325325
if (this.streamConnection != null) {
326326
// It's safe to directly close the previous connection as the in flight messages
327327
// will be picked up by the next connection.
@@ -344,7 +344,7 @@ public void run(Throwable finalStatus) {
344344
doneCallback(finalStatus);
345345
}
346346
});
347-
log.info("Reconnect done for stream:" + streamName + " id: " + writerId);
347+
log.info("Finish connecting stream: " + streamName + " id: " + writerId);
348348
}
349349

350350
/** Schedules the writing of rows at given offset. */

0 commit comments

Comments
 (0)