tsbs icon indicating copy to clipboard operation
tsbs copied to clipboard

Cassandra tsbs_run_queries_cassandra error: can not unmarshal bigint into *float64

Open seybi87 opened this issue 4 years ago • 1 comments

Hi guys,

after fixing https://github.com/timescale/tsbs/issues/124 I run into another issue with executing TSBS against a Cassandra instance.

As outlined in https://github.com/timescale/tsbs/issues/124, the data is loaded in Cassandra and the following dummy queries are generated:

tsbs_generate_queries --use-case "cpu-only" --seed "123" --scale "1000" --timestamp-start "2016-01-01T00:00:00Z" --timestamp-end "2016-01-01T01:00:01Z" --queries "10" --query-type "single-groupby-1-1-1" --format "cassandra" --file "/tmp/cassandra-queries"

These queries are executed with the following command: tsbs_run_queries_cassandra --aggregation-plan "server" --db-name "benchmark" --workers "1" --host "1.2.3.4" --file "/tmp/cassandra-queries" --debug "1" --print-responses

This ends in the following error message:

[hlqe] Do: HumanLabel: Cassandra 1 cpu metric(s), random    1 hosts, random 1h0m0s by 1m, HumanDescription: Cassandra 1 cpu metric(s), random    1 hosts, random 1h0m0s by 1m: 2016-01-01T00:00:00Z, MeasurementName: cpu, AggregationType: max, TimeStart: 2016-01-01 00:00:00.646325489 +0000 UTC, TimeEnd: 2016-01-01 01:00:00.646325489 +0000 UTC, GroupByDuration: 1m0s, TagSets: [[hostname=host_249]]
[hlqe] query planning took 6.979200ms
[qpsa] query with server aggregation plan has 61 CQLQuery objects
panic: can not unmarshal bigint into *float64

goroutine 2603 [running]:
github.com/timescale/tsbs/query.(*BenchmarkRunner).processorHandler(0xc0001044d0, 0xc00019e450, 0xc00061c2d0, 0xf9fba0, 0xc33d00, 0xc00004c3e0, 0x0)
	tsbs/query/benchmarker.go:196 +0x530
created by github.com/timescale/tsbs/query.(*BenchmarkRunner).Run
	tsbs/query/benchmarker.go:156 +0x2a2

Any help is much appreciated!

seybi87 avatar May 13 '20 09:05 seybi87

I debugged the code the calls a bit and it looks like the following line causes the error when closing the Iterator : https://github.com/timescale/tsbs/blob/master/cmd/tsbs_run_queries_cassandra/query_plan.go#L74

Yet, I do not see why closing the iterator causes this issue.

Without closing the Iterator the query execution works (for the simple example posted above) but will this cause any additional issues later on?

seybi87 avatar May 13 '20 10:05 seybi87