HTHou commented on PR #156:
URL: https://github.com/apache/iotdb-client-go/pull/156#issuecomment-4325123628

   Thanks for the PR. I think the motivation is valid: the current 
`InsertTablets` path always uses `context.Background()`, while the generated 
thrift client already accepts a `context.Context`, so callers currently have no 
way to set a deadline or cancel a long-running write RPC.
   
   That said, this looks like a partial API fix rather than a complete one. 
Other write methods such as `InsertTablet`, `InsertAlignedTablet`, 
`InsertAlignedTablets`, and `InsertRecords` still use `context.Background()` 
internally, so users would only get timeout/cancellation support for one 
insertion path. It may be better to add `WithContext` variants consistently for 
the main write APIs, with the existing methods delegating to them using 
`context.Background()`.
   
   One more detail worth documenting: this timeout would be a client-side RPC 
context timeout/cancellation. It lets the caller stop waiting and release 
client-side resources, but it does not necessarily guarantee that a request 
already received by the server is aborted server-side.


-- 
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]

Reply via email to