Skip to content

v2.0.0-rt.4 creating mysql cdc source tables failed during wide table test #18500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cyliu0 opened this issue Sep 12, 2024 · 10 comments
Closed
Assignees
Labels
block-release-v2.0 type/bug Something isn't working
Milestone

Comments

@cyliu0
Copy link
Collaborator

cyliu0 commented Sep 12, 2024

Describe the bug

https://buildkite.com/risingwave-test/wide-table/builds/107#0191e434-7017-47a6-863a-098f2ece810a

[WARN] Using S3 as the storage backend! MinIO deployment is forcefully disabled!
--
  | [INFO] [workspace/k8s] [namespace: wide-table-op9kn] Happy benchmarking!
  | Generating realtime_waybill_detail data
  | Generating realtime_waybill_cost_fee data
  | Creating realtime_waybill_detail table
  | mysql: [Warning] Using a password on the command line interface can be insecure.
  | Creating realtime_waybill_cost_fee table
  | mysql: [Warning] Using a password on the command line interface can be insecure.
  | Creating RW source and tables
  | CREATE_SOURCE
  | ERROR:  Failed to run the query
  |  
  | Caused by these errors (recent errors listed first):
  | 1: Expr error
  | 2: Unsupported function: cast(timestamp with time zone) -> timestamp without time zone
  |  
  | ERROR:  Failed to run the query
  |  
  | Caused by these errors (recent errors listed first):
  | 1: Expr error
  | 2: Unsupported function: cast(timestamp with time zone) -> timestamp without time zone

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

v2.0.0-rt.4

Additional context

No response

@cyliu0 cyliu0 added type/bug Something isn't working block-release-v2.0 labels Sep 12, 2024
@github-actions github-actions bot added this to the release-2.1 milestone Sep 12, 2024
@cyliu0 cyliu0 changed the title Creating source tables failed during wide table test Creating mysql cdc source tables failed during wide table test Sep 12, 2024
@lmatz
Copy link
Contributor

lmatz commented Sep 12, 2024

it worked before? sounds like a breaking change

@StrikeW
Copy link
Contributor

StrikeW commented Sep 12, 2024

cc @xiangjinwu to take a look. btw @cyliu0 can provide the table schema to you which is a customer scenario.

@xiangjinwu
Copy link
Contributor

xiangjinwu commented Sep 12, 2024

Note the following naming differences between MySQL and PostgreSQL (RisingWave):

  • MySQL datetime is PostgreSQL timestamp (without time zone).
  • MySQL timestamp is PostgreSQL timestamptz, which is number of s/ms/us passed since 1970-01-01 00:00:00 in UTC.

Unsupported function: cast(timestamp with time zone) -> timestamp without time zone

This looks like we are trying to insert a timestamptz (MySQL timestamp) into RisingWave timestamp, but there is no context on which time zone to use for this conversion. Is the conversion expected or accidental?

@cyliu0
Copy link
Collaborator Author

cyliu0 commented Sep 12, 2024

@xiangjinwu But we have run this case for the past months. It never failed because of this. You can check the build history on the buildkite.

And we never use MySQL timestamp in the upstream tables according to the upstream table schemas https://github.com/risingwavelabs/kube-bench/blob/main/manifests/wide-table/wide-table-sql.template.yaml#L7-L1246.

And there is no timestamptz in source table schemas as well. You can check the source tables in the same file above.

@cyliu0 cyliu0 changed the title Creating mysql cdc source tables failed during wide table test v2.0.0-rt.4 creating mysql cdc source tables failed during wide table test Sep 12, 2024
@lmatz lmatz assigned xiangjinwu and unassigned StrikeW Sep 12, 2024
@xiangjinwu
Copy link
Contributor

Thanks for sharing the schema, which is mapping from MySQL datetime to RisingWave timestamp (without time zone) correctly. There should be no timestamp with time zone at all during this test. @StrikeW Is there any related change in MySQL CDC logic in the past 2 months?

@xiangjinwu xiangjinwu assigned StrikeW and unassigned xiangjinwu Sep 12, 2024
@lmatz
Copy link
Contributor

lmatz commented Sep 12, 2024

becaue 2.0.0-rc.1 passed the test, I suppose the buggy commit is in the following range:
v2.0.0-rc.1...release-2.0

@lmatz
Copy link
Contributor

lmatz commented Sep 12, 2024

Since @xiangjinwu reproduced the bug on v2.0.0-rc.1 locally, please ignore the thread above.

@lmatz
Copy link
Contributor

lmatz commented Sep 12, 2024

In the following range between v2.0.0-rt.3 and v2.0.0-rc.1
dc8faba...v2.0.0-rc.1

@cyliu0
Copy link
Collaborator Author

cyliu0 commented Sep 12, 2024

After #18322, we can't define column in CDC tables like this update_time timestamp DEFAULT CURRENT_TIMESTAMP,. The correct definition should be update_time timestamp DEFAULT CURRENT_TIMESTAMP AT TIME ZONE 'Asia/Singapore', -- or UTC. We may support the former one in the future like MySQL and PG. But for now, we fixed our test cases to adapt to this in https://github.com/risingwavelabs/kube-bench/pull/457

@cyliu0 cyliu0 closed this as completed Sep 12, 2024
@xiangjinwu
Copy link
Contributor

#18513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block-release-v2.0 type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants