risingwavelabs / risingwave

Best-in-class stream processing, analytics, and management. Perform continuous analytics, or build event-driven applications, real-time ETL pipelines, and feature stores in minutes. Unified streaming and batch. PostgreSQL compatible.
https://go.risingwave.com/slack
Apache License 2.0
7.01k stars 577 forks source link

YCSB workloade(short ranges) scan table error #13043

Open huangjw806 opened 1 year ago

huangjw806 commented 1 year ago

When I run ycsb workloade(short ranges), I get the following error:

image

pipeline link: https://buildkite.com/risingwave-test/ycsb/builds/81

grafana log: https://grafana.test.risingwave-cloud.xyz/d/liz0yRCZz1/log-search-dashboard?from=now-24h&orgId=1&to=now&var-data_source=PE59595AED52CF917&var-namespace=rw-ycsb-test-1cn-8c16g&var-pod=benchmark-risingwave-frontend-f-7b6c4d899d-pjbfc&var-search=

lmatz commented 1 year ago

The entire error message is

2023-10-24T11:38:30.852631026Z ERROR pgwire::pg_protocol: failed to parse sql: SELECT * FROM usertable WHERE YCSB_KEY >= $1 ORDER BY YCSB_KEY FETCH FIRST $2 ROWS ONLY: sql parser error: Expected a value, found: $2 at line:1, column:75 Near " BY YCSB_KEY FETCH FIRST $2"
--
FETCH FIRST $2 ROWS ONLY

hmmm, is it the same as limit $2 ?

Edit:

FETCH FIRST 1 ROWS ONLY

is supported.

I suppose the error is due to $2, a prepared statement?

lmatz commented 1 year ago

What is confusing is that only workloade has such a problem while workloada to workloadd is fine: https://github.com/brianfrankcooper/YCSB/tree/master/workloads

Edit: workloade's configuration has the line maxscanlength=100 https://github.com/brianfrankcooper/YCSB/blob/master/workloads/workloade#L42 while others don't.

Edit: https://github.com/brianfrankcooper/YCSB/blob/master/postgrenosql/src/main/java/site/ycsb/postgrenosql/PostgreNoSQLDBClient.java#L184-L185 I supposed $2 comes from here

And it uses a prepared statement inside the createAndCacheScanStatement, which I suppose Risingwave has not supported yet: https://github.com/brianfrankcooper/YCSB/blob/ce3eb9ce51c84ee9e236998cdd2cefaeb96798a8/jdbc/src/main/java/site/ycsb/db/JdbcDBClient.java#L325

github-actions[bot] commented 4 months ago

This issue has been open for 60 days with no activity. Could you please update the status? Feel free to continue discussion or close as not planned.