Mock server causing client to panic
a-dot opened this issue · 1 comments
a-dot commented
I tried running the mock server
[a-dot ~/repos/ch-go/internal/cmd/ch-bench-server (main)]$ go build
[a-dot ~/repos/ch-go/internal/cmd/ch-bench-server (main)]$ ./ch-bench-server
starting with chunk of 1.6 MB
And then tried running the ch-write-bench-faster
benchmark. (I had to add one line to specify port 9001 instead of the default 9000):
[a-dot ~/repos/ch-bench/ch-write-bench-faster (main)]$ go build
[a-dot ~/repos/ch-bench/ch-write-bench-faster (main)]$ ./ch-write-bench-faster
Error: decode block:
github.com/ClickHouse/ch-go.(*Client).Do.func4
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/query.go:640
- decode block:
github.com/ClickHouse/ch-go.(*Client).decodeBlock
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/query.go:219
- info:
github.com/ClickHouse/ch-go/proto.(*Block).DecodeBlock
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/proto/block.go:254
- field id:
github.com/ClickHouse/ch-go/proto.(*BlockInfo).Decode
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/proto/block.go:44
- read:
github.com/ClickHouse/ch-go/proto.(*Reader).UVarInt
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/proto/reader.go:92
- read:
github.com/ClickHouse/ch-go/proto.(*Reader).ReadFull
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/proto/reader.go:66
- read next block:
github.com/ClickHouse/ch-go/internal/compress.(*Reader).Read
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/internal/compress/reader.go:117
- data size should be 0 < 913600073 < 134217728:
github.com/ClickHouse/ch-go/internal/compress.(*Reader).readBlock
/home/a-dot/go/pkg/mod/github.com/!click!house/ch-go@v0.44.1/internal/compress/reader.go:46
But then I get this panic. How do I use the mock server?
a-dot commented
I took a closer look at the mock server and realized it's not really a mock server.