This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new a8fad9d4f24 branch-2.1: [fix](Nereids) normalize plan should also lock
target table #47843 (#47916)
a8fad9d4f24 is described below
commit a8fad9d4f24f8c966a8fcad1ce94914a5ad46177
Author: morrySnow <[email protected]>
AuthorDate: Sat Feb 15 08:53:26 2025 +0800
branch-2.1: [fix](Nereids) normalize plan should also lock target table
#47843 (#47916)
pick from master #47843
---
.../doris/nereids/trees/plans/commands/insert/InsertUtils.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java
index a0858e7571d..80459013c90 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertUtils.java
@@ -255,6 +255,15 @@ public class InsertUtils {
* normalize plan to let it could be process correctly by nereids
*/
public static Plan normalizePlan(Plan plan, TableIf table) {
+ table.readLock();
+ try {
+ return normalizePlanWithoutLock(plan, table);
+ } finally {
+ table.readUnlock();
+ }
+ }
+
+ private static Plan normalizePlanWithoutLock(Plan plan, TableIf table) {
UnboundLogicalSink<? extends Plan> unboundLogicalSink =
(UnboundLogicalSink<? extends Plan>) plan;
if (table instanceof HMSExternalTable) {
HMSExternalTable hiveTable = (HMSExternalTable) table;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]