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 the active rpc metrics; Port [#17234] to branch-2.10 #18587

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -464,29 +464,30 @@ private void runInternal() {
}
continue;
}
if (error != null) {
if (eof || cancel || error != null) {
try {
completeRequest(mContext, false);
} catch (Exception e) {
LOG.error("Failed to close the request.", e);
}
replyError(error);
} else if (eof || cancel) {
try {
boolean success = !cancel;
boolean success = !cancel && error == null;
completeRequest(mContext, success);
} catch (Exception e) {
LogUtils.warnWithException(LOG, "Exception occurred while completing read request, "
+ "EOF/CANCEL sessionId: {}. {}", mContext.getRequest().getSessionId(),
mContext.getRequest(), e);
setError(new Error(AlluxioStatusException.fromThrowable(e), true));
if (error != null) {
LOG.error("Failed to close the request.", e);
} else {
LogUtils.warnWithException(LOG, "Exception occurred while completing read request, "
+ "EOF/CANCEL sessionId: {}. {}", mContext.getRequest().getSessionId(),
mContext.getRequest(), e);
error = new Error(AlluxioStatusException.fromThrowable(e), true);
}
}
if (eof) {
if (error != null) {
replyError(error);
} else if (eof) {
replyEof();
} else {
} else if (cancel) {
replyCancel();
}
}
// Leave `!mResponse.isReady() && tooManyPendingChunks()` unhandled
// since the reader is not finished in that case and needs more rounds
}

/**
Expand Down
Loading