This is an automated email from the ASF dual-hosted git repository.
eldenmoon 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 956b56c6647 [pick](short circuit) avoid set cacheId when non prepared
execute (#40909)
956b56c6647 is described below
commit 956b56c6647f39400850e6c7ffb49693a13336af
Author: lihangyu <[email protected]>
AuthorDate: Wed Sep 18 14:50:50 2024 +0800
[pick](short circuit) avoid set cacheId when non prepared execute (#40909)
#40525
---
fe/fe-core/src/main/java/org/apache/doris/qe/PointQueryExecutor.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/qe/PointQueryExecutor.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/PointQueryExecutor.java
index 68b1eb6ab93..13f6ec2a965 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/PointQueryExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/PointQueryExecutor.java
@@ -234,7 +234,10 @@ public class PointQueryExecutor implements CoordInterface {
if (snapshotVisibleVersions != null &&
!snapshotVisibleVersions.isEmpty()) {
requestBuilder.setVersion(snapshotVisibleVersions.get(0));
}
- if (shortCircuitQueryContext.cacheID != null) {
+ // Only set cacheID for prepared statement excute phase,
+ // otherwise leading to many redundant cost in BE side
+ if (shortCircuitQueryContext.cacheID != null
+ && ConnectContext.get().command ==
MysqlCommand.COM_STMT_EXECUTE) {
InternalService.UUID.Builder uuidBuilder =
InternalService.UUID.newBuilder();
uuidBuilder.setUuidHigh(shortCircuitQueryContext.cacheID.getMostSignificantBits());
uuidBuilder.setUuidLow(shortCircuitQueryContext.cacheID.getLeastSignificantBits());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]