Repository navigation
feat: refactor timeout - #622
Conversation
karel-rehor
left a comment
There was a problem hiding this comment.
This looks good for passing timeout arguments to underlying APIs. Maybe I've missed something, but I don't see client properties like writeTimeout and queryTimeout
To synchronize changes with other libraries, in addition to sending a timeout value as a function argument, we also need to set a default writeTimeout and queryTimeout value when instantiating the client or its configuration. This especially needs to be used on the query side (https://grpc.io/docs/guides/deadlines/#deadlines-on-the-client and https://grpc.io/blog/deadlines/).
Having a client property that gets reused with every call will be much more convenient for users, than having to set the timeout with every call.
9fc395e to
42575c1
Compare
vlastahajek
left a comment
There was a problem hiding this comment.
Why flood the write and query API with the timeout parameter?
Is it really necessary to change the timeout for each call?
queryTimeout is already part of the options and is used correctly.
We could add just writeTimeout to properly differentiate values.
|
Maybe? We should be pretty sure about use-cases before changing API.
What other libraries have the timeout parameter in the insert and query-like functions? I've checked Mongo and Postgresql and haven't found that. |
I'm not talking about other libraries like Mongo or Posgrest, but our client libs like influxdb3-java, influxdb3-python, influxdb3-go,.... |
|
Neither of the other InfuxDB 3 client libraries has a timeout as a parameter of the |
Hi @vlastahajek |
|
@NguyenHoangSon96, @vlastahajek
When working on the python client I added |
Closes #
Proposed Changes
Checklist