Skip to content

Commit

Permalink
[fix](statistics)Remove aquire table read lock while collect stats fo…
Browse files Browse the repository at this point in the history
…r an OlapTable (apache#90)
  • Loading branch information
Jibing-Li committed Feb 20, 2024
1 parent 90f6e24 commit 53860a5
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,9 @@ public void doExecute() throws Exception {
params.put("colName", String.valueOf(info.colName));
params.put("tblName", String.valueOf(info.tblName));
params.put("sampleExpr", getSampleExpression());
try {
tbl.readLock();
StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
String sql = stringSubstitutor.replace(INSERT_TABLE_STATISTICS);
execSQL(sql);
} finally {
tbl.readUnlock();
}
StringSubstitutor stringSubstitutor = new StringSubstitutor(params);
String sql = stringSubstitutor.replace(INSERT_TABLE_STATISTICS);
execSQL(sql);
}

@VisibleForTesting
Expand Down

0 comments on commit 53860a5

Please sign in to comment.