Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1953

DbLockManager: lock statement not always closed

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • High
    • Resolution: Fixed
    • 3.2.11, 4.2.7, 5.0.6, 5.1.2
    • 5.2.0, 5.3.0
    • None
    • None
    • Platform 176

    Description

      A client ran into a "Maximum open database cursors" on startup, originating from the Hippo locking mechanism.

      The suggestion was that in org.onehippo.repository.lock.db.DbLockManager#createLock, the lock statement is not closed when its executeUpdate call fails:

      try {
           connection = dataSource.getConnection();
           PreparedStatement lockStatement = connection.prepareStatement(getLockStatement());
           ...
           
           int changed = lockStatement.executeUpdate();
           lockStatement.close();
      
           ...
      
      } finally {
      
          // shouldn't we call lockStatement.close() here?
      
          close(connection, originalAutoCommit);
      }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jhoffman Jeroen Hoffman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: