Skip to content

Commit

Permalink
[fix](readconsistency) avoid table not exist error
Browse files Browse the repository at this point in the history
Query following createting table would throw table not exist error.
  • Loading branch information
dataroaring committed Jul 10, 2024
1 parent dff9f49 commit 47ade42
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,7 @@ private void executeByNereids(TUniqueId queryId) throws Exception {
return;
}
}
syncJournalIfNeeded();
try {
((Command) logicalPlan).run(context, this);
} catch (MustFallbackException e) {
Expand Down Expand Up @@ -759,6 +760,7 @@ private void executeByNereids(TUniqueId queryId) throws Exception {
} else {
context.getState().setIsQuery(true);
// create plan
syncJournalIfNeeded();
planner = new NereidsPlanner(statementContext);
if (context.getSessionVariable().isEnableMaterializedViewRewrite()) {
planner.addHook(InitMaterializationContextHook.INSTANCE);
Expand Down Expand Up @@ -805,7 +807,6 @@ public void finalizeQuery() {

private void handleQueryWithRetry(TUniqueId queryId) throws Exception {
// queue query here
syncJournalIfNeeded();
int retryTime = Config.max_query_retry_time;
for (int i = 0; i <= retryTime; i++) {
try {
Expand Down Expand Up @@ -955,6 +956,7 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
}
}
} else {
syncJournalIfNeeded();
analyzer = new Analyzer(context.getEnv(), context);
parsedStmt.analyze(analyzer);
parsedStmt.checkPriv();
Expand Down

0 comments on commit 47ade42

Please sign in to comment.