Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8612

DIH JdbcDataSource - statement not always closed

    Details

      Description

      There are several cases where the Statement used by JdbcDataSource is not closed, potentially resulting in too many open connections:

      • an exception is throw in the ResultSetIterator constructor
      • the result set is null in the ResultSetIterator constructor
      • an exception is thrown during import and the import is aborted (onError flag set to abort)
      1. SOLR-8612.patch
        17 kB
        Mikhail Khludnev
      2. SOLR-8612.patch
        17 kB
        Kristine Jetzke
      3. SOLR-8612.patch
        16 kB
        Kristine Jetzke
      4. SOLR-8612.patch
        16 kB
        Kristine Jetzke
      5. SOLR-8612.patch
        11 kB
        Kristine Jetzke

        Issue Links

          Activity

          Hide
          tinexw Kristine Jetzke added a comment -

          I attached a patch fixing the mentioned issues. It also fixes SOLR-3409

          Show
          tinexw Kristine Jetzke added a comment - I attached a patch fixing the mentioned issues. It also fixes SOLR-3409
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user tinexw opened a pull request:

          https://github.com/apache/lucene-solr/pull/6

          SOLR-8612 DIH JdbcDataSource: Always close ResultSet and Statement

          and also some more minor changes for better extensibility (https://issues.apache.org/jira/browse/SOLR-8618)

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/tinexw/lucene-solr master

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/lucene-solr/pull/6.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #6


          commit 77d86ef11a1898109c0abf41a8123052d41ae69f
          Author: tinexw <kristine.jetzke@kreuzwerker.de>
          Date: 2016-02-05T22:42:18Z

          Always close ResultSet and Statement and also some more changes for
          better extensibility


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user tinexw opened a pull request: https://github.com/apache/lucene-solr/pull/6 SOLR-8612 DIH JdbcDataSource: Always close ResultSet and Statement and also some more minor changes for better extensibility ( https://issues.apache.org/jira/browse/SOLR-8618 ) You can merge this pull request into a Git repository by running: $ git pull https://github.com/tinexw/lucene-solr master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/lucene-solr/pull/6.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #6 commit 77d86ef11a1898109c0abf41a8123052d41ae69f Author: tinexw <kristine.jetzke@kreuzwerker.de> Date: 2016-02-05T22:42:18Z Always close ResultSet and Statement and also some more changes for better extensibility
          Hide
          mkhludnev Mikhail Khludnev added a comment -

          removed synchronized, because I think they are redundant - DIH has no threads anymore.
          Tests are perfect, and passed well.
          I'm going to commit it soon, maybe tomorrow.

          Show
          mkhludnev Mikhail Khludnev added a comment - removed synchronized , because I think they are redundant - DIH has no threads anymore. Tests are perfect, and passed well. I'm going to commit it soon, maybe tomorrow.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 24fa92959d11e49d1c838a4496772f72a623b9b5 in lucene-solr's branch refs/heads/master from Mikhail Khludnev
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=24fa929 ]

          SOLR-8612: closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 24fa92959d11e49d1c838a4496772f72a623b9b5 in lucene-solr's branch refs/heads/master from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=24fa929 ] SOLR-8612 : closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 22e5d31cdc9e94aec8043fd451ae1918b5062528 in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=22e5d31 ]

          SOLR-8612: closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 22e5d31cdc9e94aec8043fd451ae1918b5062528 in lucene-solr's branch refs/heads/branch_6x from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=22e5d31 ] SOLR-8612 : closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)
          Hide
          mkhludnev Mikhail Khludnev added a comment -

          Commit message a little bit superfluous, but I think it's forgivable.

          Show
          mkhludnev Mikhail Khludnev added a comment - Commit message a little bit superfluous, but I think it's forgivable.
          Hide
          steve_rowe Steve Rowe added a comment -

          Reopening to backport to 6.0.2, 5.6 and 5.5.2.

          Show
          steve_rowe Steve Rowe added a comment - Reopening to backport to 6.0.2, 5.6 and 5.5.2.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 0cd5356a7305be90f7817bd00906e09a5ef2d736 in lucene-solr's branch refs/heads/branch_5_5 from Mikhail Khludnev
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0cd5356 ]

          SOLR-8612: closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 0cd5356a7305be90f7817bd00906e09a5ef2d736 in lucene-solr's branch refs/heads/branch_5_5 from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=0cd5356 ] SOLR-8612 : closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 66dd9bc63b0492a00bd55a9cc986818ef81afb95 in lucene-solr's branch refs/heads/branch_5x from Mikhail Khludnev
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=66dd9bc ]

          SOLR-8612: closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 66dd9bc63b0492a00bd55a9cc986818ef81afb95 in lucene-solr's branch refs/heads/branch_5x from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=66dd9bc ] SOLR-8612 : closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 7e2252cbc0b0783b442d0f76d5312ec6f379f0ae in lucene-solr's branch refs/heads/branch_6_0 from Mikhail Khludnev
          [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7e2252c ]

          SOLR-8612: closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 7e2252cbc0b0783b442d0f76d5312ec6f379f0ae in lucene-solr's branch refs/heads/branch_6_0 from Mikhail Khludnev [ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=7e2252c ] SOLR-8612 : closing JDBC Statement on exceptions from JdbcDataSource in DataImportHandler aka DIH (Kristine Jetzke via Mikhail Khludnev)
          Hide
          steve_rowe Steve Rowe added a comment -

          Bulk close issues released with 5.5.2.

          Show
          steve_rowe Steve Rowe added a comment - Bulk close issues released with 5.5.2.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user shalinmangar commented on the issue:

          https://github.com/apache/lucene-solr/pull/6

          This has already been merged so this pull request can be closed.

          Show
          githubbot ASF GitHub Bot added a comment - Github user shalinmangar commented on the issue: https://github.com/apache/lucene-solr/pull/6 This has already been merged so this pull request can be closed.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user tinexw closed the pull request at:

          https://github.com/apache/lucene-solr/pull/6

          Show
          githubbot ASF GitHub Bot added a comment - Github user tinexw closed the pull request at: https://github.com/apache/lucene-solr/pull/6

            People

            • Assignee:
              mkhludnev Mikhail Khludnev
              Reporter:
              tinexw Kristine Jetzke
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development