Skip to content

Commit b45def4

Browse files
authored
fix(query-orchestrator): queues reconciliation logic (#6286)
1 parent bbba7f9 commit b45def4

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

packages/cubejs-query-orchestrator/src/orchestrator/QueryCache.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,21 +182,6 @@ export class QueryCache {
182182
}
183183
}
184184

185-
/**
186-
* Force reconcile queue logic to be executed.
187-
*/
188-
public async forceReconcile(datasource = 'default') {
189-
if (!this.externalQueue) {
190-
// We don't need to reconcile external queue, because Cube Store
191-
// uses its internal queue which managed separately.
192-
return;
193-
}
194-
const queue = await this.getQueue(datasource);
195-
if (queue) {
196-
await queue.reconcileQueue();
197-
}
198-
}
199-
200185
/**
201186
* Generates from the `queryBody` the final `sql` query and push it to
202187
* the queue. Returns promise which will be resolved by the different

packages/cubejs-query-orchestrator/src/orchestrator/QueryOrchestrator.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,17 @@ export class QueryOrchestrator {
172172
* Force reconcile queue logic to be executed.
173173
*/
174174
public async forceReconcile(datasource = 'default') {
175-
await this.queryCache.forceReconcile(datasource);
175+
// pre-aggregations queue reconcile
176+
const preaggsQueue = await this.preAggregations.getQueue(datasource);
177+
if (preaggsQueue) {
178+
await preaggsQueue.reconcileQueue();
179+
}
180+
181+
// queries queue reconcile
182+
const queryQueue = await this.queryCache.getQueue(datasource);
183+
if (queryQueue) {
184+
await queryQueue.reconcileQueue();
185+
}
176186
}
177187

178188
/**

0 commit comments

Comments
 (0)