-
Notifications
You must be signed in to change notification settings - Fork 69
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
Fix race condition with use of PgVectorAgroalPoolInterceptor #727
Conversation
Once this is in, I am going to do a release of @jmartisk I think this interceptor should not be applied to the prod run, WDYT? |
By that you mean connections for any other datasource than the one configured for embedding storage? If so, then yeah. |
...ain/java/io/quarkiverse/langchain4j/pgvector/deployment/PgVectorEmbeddingStoreProcessor.java
Show resolved
Hide resolved
I mean that from what I understand, this interceptor creates a type, which I think should not never be done by the framework in production (but it currently is). |
Prior to this, the application could open a connection that did not use the interceptor and then try and reuse that connection against a PgVector database without having the interceptor (as Agroal would not take it into account because the connection was already open) Fixes: #726
But how else should it work? The application would have to register a similar interceptor by itself... Which would be annoying |
My point is that a production database would already be setup properly - in the same way you don't expect the application to create your relational schema |
For the database, sure, but this is not about the database, this is about registering an extension of the JDBC driver (client) |
Ah okay, I misunderstood it's functionality then - my bad! |
So this PR is ready then |
Ah, so IIUC it seems that actually the
which is the client-side setup. |
The question is if it's really a big burden to have it executed, just to simplify things |
Thanks for checking further. Let's leave it as is for now, and I'll open a new issue to keep the enhancement in mind for later. |
Prior to this, the application could open a connection that did not use the interceptor and then try and
reuse that connection against a PgVector database
without having the interceptor (as Agroal
would not take it into account because the connection was already open)