Uploaded image for project: 'Hippo Repository'
  1. Hippo Repository
  2. REPO-1953

DbLockManager: lock statement not always closed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 3.2.11, 4.2.7, 5.0.6, 5.1.2
    • Fix Version/s: 5.2.0, 5.3.0
    • Labels:
      None
    • Similar issues:
    • Processed by team:
      Platform
    • Sprint:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: