Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repair bug: when load normal data to questdb,remove redundant check #199

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 1 addition & 11 deletions cmd/tsbs_load_questdb/creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,10 @@ func (d *dbCreator) Init() {
}

func (d *dbCreator) DBExists(dbName string) bool {
r, err := execQuery(questdbRESTEndPoint, "SHOW TABLES")
_, err := execQuery(questdbRESTEndPoint, "SHOW TABLES")
if err != nil {
panic(fmt.Errorf("fatal error, failed to query questdb: %s", err))
}
for i, v := range r.Dataset {
if i >= 0 && v[0] == "cpu" {
panic(fmt.Errorf("fatal error, cpu table already exists"))
}
}
// Create minimal table with o3 params
// r, err = execQuery(questdbRESTEndPoint, "CREATE TABLE cpu (hostname SYMBOL, region SYMBOL, datacenter SYMBOL, rack SYMBOL, os SYMBOL, arch SYMBOL, team SYMBOL, service SYMBOL, service_version SYMBOL, service_environment SYMBOL, usage_user LONG, usage_system LONG, usage_idle LONG, usage_nice LONG, usage_iowait LONG, usage_irq LONG, usage_softirq LONG, usage_steal LONG, usage_guest LONG, usage_guest_nice LONG, timestamp TIMESTAMP) timestamp(timestamp) PARTITION BY DAY WITH o3MaxUncommittedRows=500000, o3CommitHysteresis=300s")
// if err != nil {
// panic(fmt.Errorf("fatal error, failed to create cpu table: %s", err))
// }

return false
}
Expand Down