iotopo commented on issue #74:
URL: https://github.com/apache/iotdb-client-go/issues/74#issuecomment-1432651447
我写了一个最小复现的代码,现在来看应该是 session 不支持并发。
`
func main() {
session := client.NewSession(&client.Config{
Host: "127.0.0.1",
Port: "6667",
UserName: "root",
Password: "root",
})
if err := session.Open(false, 0); err != nil {
panic(err)
}
timeout := int64(20000)
go func() {
_, err := session.ExecuteQueryStatement("select last v1 as
value from root.ln.wf02.wt02", &timeout)
if err != nil {
panic(err)
}
}()
go func() {
_, err := session.ExecuteQueryStatement("select last hardware
as value from root.ln.wf02.wt02", &timeout)
if err != nil {
panic(err)
}
}()
time.Sleep(time.Second * 200)
}
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]