cube-js / cube-js/cube

cubejs-worker: duplicate trigger for same pre-agg refresh

Open
#5,735 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Rust
Stars
20.8k
Forks
2.1k
Avg merge
1d 2h
Merged PRs (30d)
181

Description

**Describe the bug**
We can see sporadic pre-agg refresh error caused by duplicate attempts to refresh the same main pre-agg table at the same time.

![image](https://user-images.githubusercontent.com/6780745/206172236-17d2cdbf-80b3-4d26-be11-77a1afec4503.png)

```
error: relation "org_b_main_22w1fioj_1rxs3lep_1hot17r" already exists
at Parser.parseErrorMessage (/cube/node_modules/pg-protocol/src/parser.ts:369:69)
at Parser.handlePacket (/cube/node_modules/pg-protocol/src/parser.ts:188:21)
at Parser.parse (/cube/node_modules/pg-protocol/src/parser.ts:103:30)
at Socket. (/cube/node_modules/pg-protocol/src/index.ts:7:48)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at Socket.Readable.push (node:internal/streams/readable:228:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
```

**Version:**
0.31.20

**Additional context**
`CUBEJS_CONCURRENCY: 8`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.