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: remove excessive StreamWriter info logging #1359

Merged
merged 11 commits into from Oct 18, 2021
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

/*
Expand All @@ -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 {
Expand Down Expand Up @@ -441,7 +441,7 @@ private void cleanupInflightRequests() {
} finally {
this.lock.unlock();
}
log.info(
log.fine(
"Cleaning "
+ localQueue.size()
+ " inflight requests with error: "
Expand Down Expand Up @@ -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: "
Expand Down
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

/*
Expand All @@ -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 {
Expand Down Expand Up @@ -441,7 +441,7 @@ private void cleanupInflightRequests() {
} finally {
this.lock.unlock();
}
log.info(
log.fine(
"Cleaning "
+ localQueue.size()
+ " inflight requests with error: "
Expand Down Expand Up @@ -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: "
Expand Down