eclipse-vertx / vertx-sql-client

High performance reactive SQL Client written in Java
Apache License 2.0
894 stars 200 forks source link

NPE in PgDecoder if a notice is raised while no query is being executed #1460

Closed tsegismont closed 2 months ago

tsegismont commented 2 months ago

See #1442

This may happen if the connection is used by a PgSubscriber.

vietj commented 2 months ago

no test ?

tsegismont commented 2 months ago

@vietj I searched the web for cases when the server would raise a notice/error not related to a client request, but I couldn't find any. Have you encountered this case yourself before?

vietj commented 2 months ago

I think it can be reproduced using a proxy, we have similar tests like that

vietj commented 2 months ago

you can look at testDisconnectAbruptlyDuringStartup

tsegismont commented 2 months ago

I think you misunderstood my comment, the problem is not to test re-connection, the problem is to force the PostgreSQL server to raise a notice message while there are no inflight commands on the connection.

Afaiu this is not the case in testDisconnectAbruptlyDuringStartup

vietj commented 2 months ago

yes, Im saying to use the proxy server to create a fake message to be sent to the client using it

On Thu, Aug 29, 2024 at 3:19 PM Thomas Segismont @.***> wrote:

I think you misunderstood my comment, the problem is not to test re-connection, the problem is to force the PostgreSQL server to raise a notice message while there are no inflight commands on the connection.

Afaiu this is not the case in testDisconnectAbruptlyDuringStartup

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

tsegismont commented 2 months ago

@vietj PTAL

Thanks for the tip