Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-3588

Synchronising a directory fails on MySQL

    XMLWordPrintable

Details

    Description

      When running the first synchronisation of users from an external directory Stash reports errors:

      Caused by: com.atlassian.stash.exception.NoSuchUserException: Could not find a user named user.212.
      	at com.atlassian.stash.internal.crowd.RiotPolice.unknownUser(RiotPolice.java:657) ~[stash-service-impl-2.6.0-SNAPSHOT.jar:na]
      	at com.atlassian.stash.internal.crowd.RiotPolice.execute(RiotPolice.java:620) ~[stash-service-impl-2.6.0-SNAPSHOT.jar:na]
      	at com.atlassian.stash.internal.crowd.RiotPolice.setUserAttribute(RiotPolice.java:512) ~[stash-service-impl-2.6.0-SNAPSHOT.jar:na]
      	at com.atlassian.stash.internal.auth.DefaultCaptchaService.onUserCreated(DefaultCaptchaService.java:134) ~[stash-service-impl-2.6.0-SNAPSHOT.jar:na]
      	at sun.reflect.GeneratedMethodAccessor482.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_05]
      	at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_05]
      	at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ~[atlassian-event-2.3.0.jar:na]
      	... 32 common frames omitted
      

      The cause is the default transaction level of MySQL being repeatable read. A temporary solution for users is to manually change the isolation level.

      The isolation level can be changed by:

      • Running "SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;" on the server
      • Changing the Stash JDBC configuration by editing <HOME_DIR>/stash-config.properties file and appending ",tx_isolation%3D'read-committed'" to the jdbc.url property e.g. "jdbc.url=jdbc:mysql://<server>:<port>/<db>?autoReconnect=true&characterEncoding=utf8&useUnicode=true&sessionVariables=storage_engine%3DInnoDB,tx_isolation%3D'read-committed'"

      Stash needs a more permanent solution to deal with this bug.

      Attachments

        Issue Links

          Activity

            People

              tbright ThomasA
              tbright ThomasA
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: