timescale / tsbs

Time Series Benchmark Suite, a tool for comparing and evaluating databases for time series data
MIT License
1.26k stars 299 forks source link

generate_queries.sh fails on a query type #155

Open Hadrien-Cornier opened 3 years ago

Hadrien-Cornier commented 3 years ago

generate_queries.sh fails when building queries for :

format : crate , query that fails building : high-cpu-all format : mongo , query that fails building : high-cpu-all

I get the following error message : panic: number of hosts cannot be < 1; got 0

Steps to reproduce :

Run (you must export $GOPATH and replace BULK_DATA_DIR with a folder on your system)

crate bug :

FORMATS='crate' SCALE=4000 SEED=123 TS_START='2021-02-28T00:00:00Z' TS_END='2021-03-01T00:00:01Z' QUERIES=1000 QUERY_TYPES='high-cpu-all' BULK_DATA_DIR='/data/research/benchmark-ts-databases/bulk_queries/small_data_queries/crate' $GOPATH/src/github.com/timescale/tsbs/scripts/generate_queries.sh

mongo bug :

FORMATS='mongo' SCALE=4000 SEED=123 TS_START='2021-02-28T00:00:00Z' TS_END='2021-03-01T00:00:01Z' QUERIES=1000 QUERY_TYPES='high-cpu-all' BULK_DATA_DIR='/data/research/benchmark-ts-databases/bulk_queries/small_data_queries/mongo' $GOPATH/src/github.com/timescale/tsbs/scripts/generate_queries.sh

Detailed error message :

panic: number of hosts cannot be < 1; got 0

goroutine 1 [running]:
github.com/timescale/tsbs/cmd/tsbs_generate_queries/databases/mongo.panicIfErr(...)
        /localhome/home/****/go_projects/src/github.com/timescale/tsbs/cmd/tsbs_generate_queries/databases/mongo/devops.go:17
github.com/timescale/tsbs/cmd/tsbs_generate_queries/databases/mongo.(*Devops).HighCPUForHosts(0xc00079a010, 0x791b00, 0xc0007a6000, 0x0)
        /localhome/home/****/go_projects/src/github.com/timescale/tsbs/cmd/tsbs_generate_queries/databases/mongo/devops.go:324 +0xee5
github.com/timescale/tsbs/cmd/tsbs_generate_queries/uses/devops.(*HighCPU).Fill(0xc00079e000, 0x791b00, 0xc0007a6000, 0x416c6f, 0x7f1977530f00)
        /localhome/home/****/go_projects/src/github.com/timescale/tsbs/cmd/tsbs_generate_queries/uses/devops/high_cpu.go:31 +0x84
github.com/timescale/tsbs/internal/inputs.(*QueryGenerator).runQueryGeneration(0xc000161f08, 0x78aa20, 0xc00079a010, 0x78ab40, 0xc00079e000, 0x92ae40, 0x0, 0x0)
        /localhome/home/****/go_projects/src/github.com/timescale/tsbs/internal/inputs/generator_queries.go:221 +0x1dc
github.com/timescale/tsbs/internal/inputs.(*QueryGenerator).Generate(0xc000161f08, 0x78d720, 0x92ae40, 0x0, 0x0)
        /localhome/home/****/go_projects/src/github.com/timescale/tsbs/internal/inputs/generator_queries.go:92 +0x174
main.main()
        /localhome/home/****/go_projects/src/github.com/timescale/tsbs/cmd/tsbs_generate_queries/main.go:94 +0xae
jonatas commented 3 years ago

@Hadrien-Cornier thanks for reporting. I created #165 to fix it. Would you mind testing it locally?

Hadrien-Cornier commented 3 years ago

done, posted the answer on #165