Hi,
I am using datastax python-driver to connect to Cassandra. I have following questions/clarifications:
- I am following the examples code(https://github.com/datastax/python-driver/tree/master/examples) but was curious to check if I need to programmatically close the connection after every query "session.execute" ? or underlying connection pool will close it once a query is executed?
- Any recommendations around connection handling while using python-driver?
- I am using a long running process which uses one global cassandra session obtained using "session = cluster.connect(...)" snippet and uses this session to execute all the queries while this process is running and processes continuous stream of records. Can this approach cause any issues on cassandra cluster in terms of long running connections? I wanted to reuse same connection as having a new one for each record may be costly? Please advise.
- I want to implement close connection logic in my program itself, but wanted to learn more about if this is handled by python-driver already? If pyhon-driver does it underneath, then I may not need it.
Thanks