joao-r-reis commented on issue #1851: URL: https://github.com/apache/cassandra-gocql-driver/issues/1851#issuecomment-2579872682
> Exec() properly manages the refCount internally It does manage it internally yes, you should only have to explicitly call `Release()` if you don't execute the query. > The lack of Release() might cause resource leaks It will if `Exec()` or `Iter()` isn't called on the query. > Multiple Release() calls could potentially affect other queries using recycled objects from the pool There's a Compare And Set operation to ensure only one `Release()` ever happens on a particular query object, regardless of whether it is being triggered by the user or by the driver internally. --- @lukasz-antoniak I wasn't aware of the `queryPool` when we were discussing https://github.com/apache/cassandra-gocql-driver/pull/1848 , we might have to take another look to see if it makes sense to change the behavior of the query pool with the changes in https://github.com/apache/cassandra-gocql-driver/pull/1848 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
