[
https://issues.apache.org/jira/browse/MAPREDUCE-840?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741220#action_12741220
]
Aaron Kimball commented on MAPREDUCE-840:
-----------------------------------------
Enis,
Closing the resultset and the statement do not commit the transaction. The
postgresql server will continue to hold reader locks on all affected tables
until that connection is closed, times out, etc. (Postgresql will begin a
transaction for any SELECT statement; other drivers may or may not wrap reads
in a transaction -- JDBC doesn't mandate what happens here. Thus far this is an
issue for me only with Postgresql; mysql and oracle don't seem to produce this
same behavior.)
This is about cleaning up server-side resources, at least insofar as Postgresql
implements the spec. I think that it's good hygiene to assume that any driver
may open a transaction that should be committed when we're done reading.
> DBInputFormat leaves open transaction
> -------------------------------------
>
> Key: MAPREDUCE-840
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-840
> Project: Hadoop Map/Reduce
> Issue Type: Bug
> Reporter: Aaron Kimball
> Assignee: Aaron Kimball
> Priority: Minor
> Attachments: MAPREDUCE-840.patch
>
>
> DBInputFormat.getSplits() does not connection.commit() after the COUNT query.
> This can leave an open transaction against the database which interferes with
> other connections to the same table.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.