From fd85b2b5e7cc43deecd90d427bdfec5988f54d61 Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Thu, 11 Jan 2024 18:39:43 +0100 Subject: [PATCH] fix(query-orchestrator): QueryQueue - reduce trafic (unexpected call for query stage) --- .../src/orchestrator/PreAggregations.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts b/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts index 8595ab0e535fc..687bc4345cf40 100644 --- a/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts +++ b/packages/cubejs-query-orchestrator/src/orchestrator/PreAggregations.ts @@ -661,12 +661,7 @@ export class PreAggregationLoader { }; } - // TODO this check can be redundant due to structure version is already checked in loadPreAggregation() - if ( - !this.waitForRenew && - // eslint-disable-next-line no-use-before-define - await this.loadCache.getQueryStage(PreAggregations.preAggregationQueryCacheKey(this.preAggregation)) - ) { + if (!this.waitForRenew) { const versionEntryByStructureVersion = versionEntries.byStructure[`${this.preAggregation.tableName}_${structureVersion}`]; if (versionEntryByStructureVersion) { const targetTableName = this.targetTableName(versionEntryByStructureVersion);