Skip to content

Commit

Permalink
cube: Patch redis error
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Mar 26, 2024
1 parent 4748ed4 commit d98983a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cube/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ FROM cubejs/cube:v0.35
RUN apt-get update \
&& apt-get install -y patch \
&& rm -rf /var/lib/apt/lists/*
# https://github.com/cube-js/cube/issues/2368
COPY ./add-cache-control.patch /cube
RUN cd /cube && patch -p0 < add-cache-control.patch
# https://github.com/cube-js/cube/pull/7959
COPY ./fix-redis.patch /cube
RUN cd /cube && \
patch -p0 < add-cache-control.patch && \
patch -p0 < fix-redis.patch
COPY --from=builder /app .
EXPOSE 4000
14 changes: 14 additions & 0 deletions cube/fix-redis.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- node_modules/@cubejs-backend/query-orchestrator/dist/src/orchestrator/RedisQueueDriver.js 2024-03-26 14:09:49
+++ node_modules/@cubejs-backend/query-orchestrator/dist/src/orchestrator/RedisQueueDriver.js 2024-03-26 14:09:49
@@ -196,6 +196,11 @@
.set(lockKey, processingId, 'NX')
.zadd([this.heartBeatRedisKey(), 'NX', new Date().getTime(), this.redisHash(queryKey)])
.execAsync();
+
+ if (!result) {
+ return null;
+ }
+
if (result) {
result[4] = JSON.parse(result[4]);
if (this.getQueueEventsBus) {

0 comments on commit d98983a

Please sign in to comment.