Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection pool - The default implementation is not recommended for production use #16

Open
calleay opened this issue Sep 10, 2021 · 0 comments

Comments

@calleay
Copy link

calleay commented Sep 10, 2021

Hello,

For both the Dremio and Dremio+Flight dialects, the SingletonThreadPool connection pool implementation is used by default.

While this configuration can be easily overridden, it would possibly be safer to use a different connection pool implementation as this one is not recommended for production use and can cause some inconvenient behaviors in a production setup (e.g., connection randomly closed in the middle of a query execution).
See https://docs.sqlalchemy.org/en/14/core/pooling.html#sqlalchemy.pool.SingletonThreadPool for further detail.

class DremioDialect(default.DefaultDialect):
name = 'dremio'
supports_sane_rowcount = False
supports_sane_multi_rowcount = False
poolclass = pool.SingletonThreadPool
statement_compiler = DremioCompiler

class DremioDialect_flight(default.DefaultDialect):
name = 'dremio+flight'
supports_sane_rowcount = False
supports_sane_multi_rowcount = False
poolclass = pool.SingletonThreadPool
statement_compiler = DremioCompiler

Thanks again and keep up with the good work 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant