github-actions[bot] commented on code in PR #63721:
URL: https://github.com/apache/doris/pull/63721#discussion_r3308978492
##########
fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java:
##########
@@ -573,13 +573,17 @@ public void queryRetry(TUniqueId queryId) throws
Exception {
TUniqueId firstQueryId = queryId;
int retryTime = Config.max_query_retry_time;
retryTime = retryTime <= 0 ? 1 : retryTime + 1;
+ boolean disableCloudVersionCacheOnRetry = false;
// If the query is an `outfile` statement,
// we execute it only once to avoid exporting redundant data.
if (parsedStmt instanceof Queriable) {
retryTime = ((Queriable) parsedStmt).hasOutFileClause() ? 1 :
retryTime;
}
for (int i = 1; i <= retryTime; i++) {
try {
+ if (disableCloudVersionCacheOnRetry) {
+ setCloudVersionCacheTtlZeroForNextAttempt();
+ }
Review Comment:
This runs before `execute()`, but `execute()` can apply SQL-level `SET_VAR`
hints later during parsing/analysis. For example, after an E-230 from `select
/*+ SET_VAR(cloud_partition_version_cache_ttl_ms=3600000) */ ...`, this line
sets the session TTL to 0, then `SelectHintSetVar.setVarOnceInSql()` is invoked
from the Nereids hint path and sets the TTL back to 3600000 before
`CloudPartition.getSnapshotVisibleVersion()` /
`OlapTable.getVisibleVersionInBatch()` choose whether to use cached versions.
That retry can keep reading the stale cached version and continue to fail until
retry exhaustion. Please ensure the temporary zero wins after SET_VAR
processing too, or explicitly reject/ignore these two SET_VAR hints during this
E-230 retry path, and add coverage for that case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]