ClickHouse / clickhouse-cpp

C++ client library for ClickHouse
Apache License 2.0
305 stars 159 forks source link

CRC failed #325

Closed mmitkevich closed 1 year ago

mmitkevich commented 1 year ago

with latest clickhouse-client-cpp release and clickhouse-server 23.x I get CRC error when using LZ4 compression in client.

I digged into CRC and server's ipml https://github.com/ClickHouse/ClickHouse/blob/17f37541935bce25e2b200f061baafa4dadb338e/contrib/cityhash102/src/city.cc#L344

image

looks just like client's impl

https://github.com/ClickHouse/clickhouse-cpp/blob/master/contrib/cityhash/cityhash/city.cc#L339

image

but it does not work anymore. Probably it's worth to use the server's code here?

here is my server problem desc https://github.com/ClickHouse/ClickHouse/issues/53932

Enmk commented 1 year ago

Hi @mmitkevich thank you for reporting! Yes, we sure want to be compatible with ClickHouse's server implementation.

Could you please create a PR with the proposed changes?

Enmk commented 1 year ago

Hi @mmitkevich could you please provide more info on that? I tested against 23.8 and wasn't able to reproduce the issue.

Do you have any sample code that reproduces that?

Enmk commented 1 year ago

Hi, @mmitkevich! Have you by any chance used cityhash 1.1 which comes as an OS package? IIRC some versions might be incompatible...

mmitkevich commented 1 year ago

After ensuring my program is linked against bundled cityhash it looks like the problem has gone