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](fe) fix several blocking bugs #37756 #37758

Merged
merged 2 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
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 @@ -2364,7 +2364,6 @@ public int hashCode() {
int result = super.hashCode();
result = 31 * result + Objects.hashCode(opcode);
result = 31 * result + Objects.hashCode(fnName);
result = 31 * result + Objects.hashCode(fnParams);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,20 @@ public void forward(long catalogId, long dbId) throws Exception {
boolean isReturnToPool = false;
try {
TInitExternalCtlMetaResult result = client.initExternalCtlMeta(request);
Env.getCurrentEnv().getJournalObservable().waitOn(result.maxJournalId, waitTimeoutMs);
if (!result.getStatus().equalsIgnoreCase(STATUS_OK)) {
throw new UserException(result.getStatus());
} else {
// DO NOT wait on journal replayed, this may cause deadlock.
// 1. hold table read lock
// 2. wait on journal replayed
// 3. previous journal (eg, txn journal) replayed need to hold table write lock
// 4. deadlock
// But no waiting on journal replayed may cause some request on non-master FE failed for some time.
// There is no good solution for this.
// In feature version, this whole process is refactored, so we temporarily remove this waiting.
// Env.getCurrentEnv().getJournalObservable().waitOn(result.maxJournalId, timeoutMs);
isReturnToPool = true;
}
isReturnToPool = true;
} catch (Exception e) {
LOG.warn("Failed to finish forward init operation, please try again. ", e);
throw e;
Expand Down
Loading