Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-10402

int overflow in InstallerDb causes bamboo failures

    XMLWordPrintable

    Details

    • Sprint:
      Horizon - October 10th 2018

      Description

      PostgreSQL's OID type is a 32-bit unsigned integer, but by default Java's int type is 31-bit signed.  For long-running databases, these OID columns overflow and cause failures in InstallerDb.

       

      org.postgresql.util.PSQLException: Bad value for type int : 2148271220
      	at org.postgresql.jdbc.PgResultSet.toInt(PgResultSet.java:2829)
      	at org.postgresql.jdbc.PgResultSet.getInt(PgResultSet.java:2050)
      	at org.opennms.core.db.install.InstallerDb.getConstraintsFromDB(InstallerDb.java:1172)
      	at org.opennms.core.db.install.InstallerDb.getTableFromDB(InstallerDb.java:1029)
      	at org.opennms.core.db.install.InstallerDb.createTables(InstallerDb.java:831)
      	at org.opennms.core.test.db.InstallerDbIT.testCreateTablesTwice(InstallerDbIT.java:147) 

        Attachments

          Activity

            People

            Assignee:
            ranger Benjamin Reed
            Reporter:
            ranger Benjamin Reed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: