db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepa Remesh" <drem...@gmail.com>
Subject Re: [jira] Commented: (DERBY-210) Network Server will leak prepared statements if not explicitly closed by the user until the connection is closed
Date Mon, 20 Feb 2006 21:56:30 GMT
On 2/20/06, Bryan Pendleton <bpendleton@amberpoint.com> wrote:
> Deepa Remesh (JIRA) wrote:
> > I'm reworking finalize method to continue sending CLSQRY as Kathey suggested and
will upload new version of patch 4.
>
> What about the concern that Dan expressed a few weeks back:
>
>     1) Doing anything complex in a finalizer can be trouble, as the order
>        of finalizer execution is not guaranteed and so any synchronization
>        can lead to deadlocks. The embedded engine works around this by
>        having the finalizer just mark some object as not being used any
>        more and some later action on the connection will also cleanup
>        the finailzed object.
>
> Do we perhaps need to construct some more sophisticated mechanism in the
> client-side infrastructure, so that we can mark a statement as "reclaimable"
> in the finalizer, and then have a normal thread perform the cleanup
> operations subsequently?
>

Bryan, thanks for bringing this up. Please see if the following is okay:

If we add back CLSQRY to the finalize call, we need to have
synchronization around the code where we send CLSQRY to network server
and read server's reply. This synchronization is to ensure we wait for
the correct reply. It does not change the state of any objects, So I
think it is okay for it to be there in the finalizer. If anyone has
other opinions, please share your thoughts.

Thanks,
Deepa

Mime
View raw message