On Sat, Jan 8, 2011 at 1:10 AM, Shane Perry <thry...@gmail.com> wrote:
> Hi,
>
> I am in the process of migrating our system from Postgres 8.4 to Solr
> 1.4.1.  Our system is fairly complex and as a result, I have had to define
> 19 base entities in the data-config.xml definition file.  Each of these
> entities executes 5 queries.  When doing a full-import, as each entity
> completes, the server hosting Postgres shows 5 "idle in transaction" for the
> entity.
>
> In digging through the code, I found that the JdbcDataSource wraps the
> ResultSet object in a custom ResultSetIterator object, leaving the ResultSet
> open.  Walking through the code I can't find a close() call anywhere on the
> ResultSet.  I believe this results in the "idle in transaction" processes.
[...]

Have not examined the "idle in transaction" issue that you
mention, but the ResultSet object in a ResultSetIterator is
closed in the private hasnext() method, when there are no
more results, or if there is an exception. hasnext() is called
by the public hasNext() method that should be used in
iterating over the results, so I see no issue there.

Regards,
Gora

P.S. This is from Solr 1.4.0 code, but I would not think that
        this part of the code would have changed.

Reply via email to