Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-2412

LDAP Federation - synchronization on cluster error

    XMLWordPrintable

Details

    Description

      User synchronization ends with error on cluster:
      javax.persistence.OptimisticLockException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
      Full stack trace attached

      If synchronization is started manually there is no problem with the feature.
      The issue occurs when synchronization takes a lot of time (long transaction).

      I think that it can be a problem with scheduled job synchronization on cluster. BasicTimerProvider uses simple, not synchronized java timers and it can cause race condition on database.

      As a working workaround we introduce mechanism which adds offset for synchronization time on each node of the cluster.

      Attachments

        1. timers-log.txt
          6 kB
          Łukasz Skierkowski

        Activity

          People

            mposolda@redhat.com Marek Posolda
            skieras_jira Łukasz Skierkowski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: