go-sdk icon indicating copy to clipboard operation
go-sdk copied to clipboard

does it support go routine and connect pool

Open li-bit opened this issue 6 years ago • 3 comments

li-bit avatar Dec 26 '19 06:12 li-bit

Can you please provide more details (or some code example) on the functionality that you think is missing? In theory:

  • go routine - yes, should be not a problem
  • connect pool - not clear what you mean

manticoresearch avatar Jan 06 '20 08:01 manticoresearch

After read the code, we can figure out: manticore.Client is not go routine safe, it's just a thin wrap on a net.Conn. We should build a pool of manticore.Client objects if we want access manticore server concurrently. If manticore server restarted, the connection will lost, and we must make sure manticore.Client reconnect afterwards.

tangxinfa avatar Dec 21 '21 12:12 tangxinfa

manticore.Client.Ping() will cause the connection disconnected, how to detect the connection is alive?

tangxinfa avatar Dec 21 '21 13:12 tangxinfa