Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Reduce timeout of waiting in queue from 15 minutes to 5 minutes and rephrase the log a bit #2084

Merged
merged 11 commits into from
Apr 25, 2023
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:

```Groovy
implementation platform('com.google.cloud:libraries-bom:26.12.0')
implementation platform('com.google.cloud:libraries-bom:26.13.0')

implementation 'com.google.cloud:google-cloud-bigquerystorage'
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class ConnectionWorker implements AutoCloseable {
* We will constantly checking how much time we have been waiting for the next request callback
* if we wait too much time we will start shutting down the connections and clean up the queues.
*/
static Duration MAXIMUM_REQUEST_CALLBACK_WAIT_TIME = Duration.ofMinutes(15);
static Duration MAXIMUM_REQUEST_CALLBACK_WAIT_TIME = Duration.ofMinutes(5);

private Lock lock;
private Condition hasMessageInWaitingQueue;
Expand Down Expand Up @@ -321,7 +321,7 @@ public void run() {
}

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

/** Schedules the writing of rows at given offset. */
Expand Down