Open kevinleeTCA opened 1 month ago
Similar issue has been reported in early cube version.
Hi @kevinleeTCA 👋
Let's clarify a few bits about your setup. I see that you use pre-aggregations and, at the same time, I see that you set CUBEJS_CACHE_AND_QUEUE_DRIVER=memory
. Why would you not use Cube Store? Are you trying to use something else for pre-aggregation storage?
I suggest that you set up a Cube Store cluster (router node, at least two worker nodes), use it both for cache/queue and pre-aggregations; also, please upgrade to the latest version of Cube. I believe that would resolve the issue.
Hi @igorlukanin thank you for your reply.
We upgraded to the latest version (v0.35) a few weeks, a and this problem still happens, see below latest log:
Regarding the reason that why we have to use memory
for CUBEJS_CACHE_AND_QUEUE_DRIVER
, as we are blocked by this, i.e., cubestore does not support timestampz (which are used frequently in postgres db).
@paveltiunov Where should I cast the value? Should I create a new dimension with a value casted to timestamp or just casting the existing time dimension will be fine (assuming it wont' affect timezone)?
@kevinleeTCA How exactly are you blocked? Can you please explain?
@igorlukanin I shared the link above, basically we encountered an issue when running pre-aggregation with timestampz (postgres primary type) as time dimension:
ERROR [cubestore::http] <pid:1> Error processing HTTP command: Custom type 'timestamptz' is not supported
I will try your proposal mentioned here:
dimensions:
# It's OK to have a TIMESTAMPZ value as a time dimension, it will work just fine
- name: created_at
sql: created_at
type: time
# You have to cast it to `TIMESTAMP` if you'd like to use it in a non-`time` dimension
- name: created_at_raw
sql: "created_at::TIMESTAMP"
type: string
Will update it here on how it goes
Problem
1. The cube pre-aggregation fails when client is requesting cube data via API.
Error:
Detailed error:
2. Error: relation ... does not exist
This also happens sometime when client is requesting cube data via API, looks like it tries to find a cache but ends up being dropped by cube worker.
detailed error:
We found out that this
does not exist
is probably related to the ENV VARCUBEJS_DROP_PRE_AGG_WITHOUT_TOUCH
when it is enabled astrue
, when we disable this, thedoes not exist
issue disapprears, but it has other side effect, i.e., cube API is using deprecated cache when resolving client's API request, causing missing data issues.Current setup:
Current cube and preaggregation: