Skip to content

panic index out of range when execute the function agent.GetFields #48

@fcddk

Description

@fcddk

log:

time="2020-11-10 06:34:45" level=debug msg="discovered measurement &{\x18.�\x1b\x00\v� map[]} on DB: prometheus-RP:autogen"
time="2020-11-10 06:34:45" level=debug msg="get fields query[show field keys from "\x18.�\x1b\x00\v�"],db[prometheus],meas[\x18.�\x1b\x00\v�]"
time="2020-11-10 06:34:45" level=debug msg="get fields from meas[\x18.�\x1b\x00\v�], response:[[]]"
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/toni-moreno/syncflux/pkg/agent.GetFields(0xbee080, 0xc00038aa90, 0xc00039a870, 0xa, 0xc00012c890, 0xb, 0xc00002f9a7, 0x7, 0xc0002ae000)
/home/golang/src/github.com/toni-moreno/syncflux/pkg/agent/client.go:256 +0x8fc
github.com/toni-moreno/syncflux/pkg/agent.(*HACluster).GetSchema(0xc000120f70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0xb58088, 0xc0001cdd60, ...)
/home/golang/src/github.com/toni-moreno/syncflux/pkg/agent/hacluster.go:147 +0x8ea
github.com/toni-moreno/syncflux/pkg/agent.HAMonitorStart(0xc00012c2a0, 0xa, 0xc00012c380, 0xa)
/home/golang/src/github.com/toni-moreno/syncflux/pkg/agent/agent.go:247 +0x9b
main.main()
/home/golang/src/github.com/toni-moreno/syncflux/pkg/main.go:296 +0x53b

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions