Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-14099

Queued sync doesn't work for mappings with names longer than 38 characters in JDBC repo

    XMLWordPrintable

    Details

      Description

      To reproduce this issue:

      1. Set up IDM with JDBC repo, eg mysql.

      2. Create a managed object "managed/verylongnamedobject". Create a csv connector named "verylongnamedcsvconnector". Create a mapping "managedVerylongnamedobject_systemVerylongnamedcsv". Enable queued sync on this mapping.

      3. Create new resources in managed/verylongnameobjects. The events are stuck in the sync queue. For example:

          "result": [
              {
                  "_id": "5e99b29c-03be-4747-85b1-b0a1f78de262",
                  "_rev": "0",
                  "mapping": "managedVerylongnamedobject_systemVerylongnamedcsv",
                  "resourceId": "9b8e9923-6abf-411e-a68a-20a3655dd1f6",
                  "remainingRetries": 3,
                  "syncAction": "notifyCreate",
                  "state": "PENDING",
                  "resourceCollection": "managed/verylongnamedobject",
                  "nodeId": null,
                  "createDate": "2019-11-19T08:20:40.817000000Z"
              },
              {
                  "_id": "9d83932d-4487-4634-b7cc-93a9c0a09839",
                  "_rev": "0",
                  "mapping": "managedVerylongnamedobject_systemVerylongnamedcsv",
                  "resourceId": "f20f3b13-e452-4a01-940a-081f4b5a40a0",
                  "remainingRetries": 3,
                  "syncAction": "notifyCreate",
                  "state": "PENDING",
                  "resourceCollection": "managed/verylongnamedobject",
                  "nodeId": null,
                  "createDate": "2019-11-19T08:30:06.744000000Z"
              }
      

      4. The logs show that IDM is unable to acquire lock for the mapping due to MysqlDataTruncation.

      ThreadID=17 ThreadName=FelixStartLevel - Nov 19, 2019 4:26:05.127 PM org.forgerock.openidm.sync.impl.queue.QueueConsumerFactory lockMapping
      FINE: Attempting to acquire lock for managedVerylongnamedobject_systemVerylongnamedcsv
      ...
      ThreadID=17 ThreadName=FelixStartLevel - Nov 19, 2019 4:26:05.138 PM org.forgerock.openidm.repo.jdbc.impl.ExplicitTableHandler create
      FINE: Create with fullid locks/managedVerylongnamedobject_systemVerylongnamedcsv
      ThreadID=17 ThreadName=FelixStartLevel - Nov 19, 2019 4:26:05.139 PM org.forgerock.openidm.repo.jdbc.impl.ExplicitTableHandler create
      FINE: Preparing statement org.forgerock.openidm.repo.jdbc.impl.query.TracedPreparedStatement@90f8eb7 with locks, managedVerylongnamedobject_systemVerylongnamedcsv, 0
      ThreadID=17 ThreadName=FelixStartLevel - Nov 19, 2019 4:26:05.139 PM org.forgerock.openidm.repo.jdbc.impl.ExplicitTableHandler create
      FINE: Executing: org.forgerock.openidm.repo.jdbc.impl.query.TracedPreparedStatement@90f8eb7
      ThreadID=17 ThreadName=FelixStartLevel - Nov 19, 2019 4:26:05.146 PM org.forgerock.openidm.repo.jdbc.impl.JDBCRepoService lambda$handleCreate$2
      FINE: SQL Exception in create of locks/managedVerylongnamedobject_systemVerylongnamedcsv with error code 1406, sql state 22001
      com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'objectid' at row 1
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3974)
              at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
              ...
              at org.forgerock.openidm.lock.impl.SimpleRepositoryLockService.acquire(SimpleRepositoryLockService.java:90)
              at org.forgerock.openidm.sync.impl.queue.QueueConsumerFactory.lockMapping(QueueConsumerFactory.java:376)
              at org.forgerock.openidm.sync.impl.queue.QueueConsumerFactory.consumerRequired(QueueConsumerFactory.java:364)
      ...
      ThreadID=17 ThreadName=FelixStartLevel - Nov 19, 2019 4:26:05.149 PM org.forgerock.openidm.sync.impl.queue.QueueConsumerFactory lockMapping
      FINE: Failed to acquire lock for managedVerylongnamedobject_systemVerylongnamedcsv
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cgdrake Chris Drake
              Reporter:
              yinyan.cao Yinyan Cao
              QA Assignee:
              Petr Bednar [X] Petr Bednar [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: