Skip to content

Commit

Permalink
feat: More logging info for Orphaned Queries debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltiunov committed Jul 20, 2020
1 parent 861db10 commit 99bf957
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
21 changes: 19 additions & 2 deletions packages/cubejs-query-orchestrator/orchestrator/QueryQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,26 @@ class QueryQueue {
processingLockAcquired,
query,
insertedCount,
activeKeys
activeKeys,
activated,
queryExists: !!query
});
await redisClient.freeProcessingLock(queryKey, processingId, activated);
const currentProcessingId = await redisClient.freeProcessingLock(queryKey, processingId, activated);
if (currentProcessingId) {
this.logger('Skipping free processing lock', {
processingId,
currentProcessingId,
queryKey: query && query.queryKey || queryKey,
requestId: query && query.requestId,
queuePrefix: this.redisQueuePrefix,
processingLockAcquired,
query,
insertedCount,
activeKeys,
activated,
queryExists: !!query
});
}
}
} catch (e) {
this.logger('Queue storage error', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ class RedisQueueDriverConnection {
}
await removeCommand
.execAsync();
return null;
} else {
return currentProcessId;
}
} finally {
await this.redisClient.unwatchAsync();
Expand Down

0 comments on commit 99bf957

Please sign in to comment.