shuwenwei commented on PR #162:
URL: https://github.com/apache/iotdb-client-go/pull/162#issuecomment-4764195392

   `rows.Close` currently discards errors returned by the underlying 
`SessionDataSet.Close()`:
   
   ```go
   func (r *rows) Close() error {
       if r.set != nil {
           r.set.Close()
       }
       if r.release != nil {
           r.release()
           r.release = nil
       }
       return nil
   }
   ```
   
   `SessionDataSet.Close()` sends `CloseOperation` to the server and verifies 
the returned status, so a failure here means the server-side query operation 
may not have been cleaned up correctly. Because this wrapper always returns 
nil, callers of `database/sql.Rows.Close()` cannot observe that cleanup failure.
   
   Please preserve and return the close error while still guaranteeing that 
`release()` runs exactly once, for example by storing the `r.set.Close()` error 
and returning it after releasing the session.


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