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

Cannot disable fork synching when running on Oracle DB

    XMLWordPrintable

Details

    Description

      This is issue is seen when there are over 1000 rows in the REJECTED_REF table associated with the repository. When fork synching is disabled Bitbucket Server attempts to clean up the table. The DELETE query uses an IN clause which in Oracle cannot contain more than 1000 literal values.

      java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000
              at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.delete(EntityManagedActiveObjects.java:137) ~[na:na]
              at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.delete(TenantAwareActiveObjects.java:311) ~[na:na]
              at com.atlassian.stash.internal.repository.sync.dao.AoRefSyncDao.removeRefs(AoRefSyncDao.java:182) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.dao.AoRefSyncDao.setEnabled(AoRefSyncDao.java:95) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.DefaultRefSyncService$SetEnabledAndSynchronizeOperation$1.execute(DefaultRefSyncService.java:550) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.DefaultRefSyncService$SetEnabledAndSynchronizeOperation$1.execute(DefaultRefSyncService.java:546) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.ao.AbstractAoTransactionCallback.doInTransaction(AbstractAoTransactionCallback.java:21) ~[stash-ao-common-3.7.4.jar:na]
              at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) ~[sal-core-2.13.3.jar:na]
              at com.atlassian.stash.internal.sal.spi.HostContextAccessorImpl.doInTransaction(HostContextAccessorImpl.java:27) ~[stash-platform-3.7.4.jar:na]
              at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) ~[sal-core-2.13.3.jar:na]
              at com.atlassian.stash.internal.repository.sync.DefaultRefSyncService$SetEnabledAndSynchronizeOperation.perform(DefaultRefSyncService.java:546) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.DefaultRefSyncService$SetEnabledAndSynchronizeOperation.perform(DefaultRefSyncService.java:532) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.util.TimerUtils.time(TimerUtils.java:54) ~[stash-util-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.DefaultRefSyncService.time(DefaultRefSyncService.java:300) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.DefaultRefSyncService.setEnabled(DefaultRefSyncService.java:218) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.stash.internal.repository.sync.rest.RefSyncResource.setEnabled(RefSyncResource.java:131) ~[stash-repository-ref-sync-3.7.4.jar:na]
              at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) [applinks-plugin-4.3.5_1430737142000.jar:na]
              at com.atlassian.stash.internal.spring.security.StashAuthenticationFilter.doFilter(StashAuthenticationFilter.java:86) [StashAuthenticationFilter.class:na]
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doInsideSpringSecurityChain(BeforeLoginPluginAuthenticationFilter.java:111) [BeforeLoginPluginAuthenticationFilter.class:na]
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:77) [BeforeLoginPluginAuthenticationFilter.class:na]
              at com.atlassian.security.auth.trustedapps.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:100) [atlassian-trusted-apps-core-3.0.8.jar:na]
              at com.atlassian.oauth.serviceprovider.internal.servlet.OAuthFilter.doFilter(OAuthFilter.java:79) [atlassian-oauth-service-provider-plugin-1.9.10_1430737142000.jar:na]
              at com.atlassian.analytics.client.filter.DefaultAnalyticsFilter.doFilter(DefaultAnalyticsFilter.java:32) [analytics-client-3.56_1430741586000.jar:na]
              at com.atlassian.analytics.client.filter.AbstractHttpFilter.doFilter(AbstractHttpFilter.java:32) [analytics-client-3.56_1430741586000.jar:na]
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doBeforeBeforeLoginFilters(BeforeLoginPluginAuthenticationFilter.java:89) [BeforeLoginPluginAuthenticationFilter.class:na]
              at com.atlassian.stash.internal.web.auth.BeforeLoginPluginAuthenticationFilter.doFilter(BeforeLoginPluginAuthenticationFilter.java:75) [BeforeLoginPluginAuthenticationFilter.class:na]
              at com.atlassian.stash.internal.request.DefaultRequestManager.doAsRequest(DefaultRequestManager.java:85) [stash-service-impl-3.7.4.jar:na]
              at com.atlassian.stash.internal.hazelcast.ConfigurableWebFilter.doFilter(ConfigurableWebFilter.java:38) [ConfigurableWebFilter.class:na]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [na:1.7.0]
              at java.lang.Thread.run(Thread.java:722) [na:1.7.0]
              ... 273 frames trimmed
      

      Attachments

        Issue Links

          Activity

            People

              jpalacios Juan Palacios (Inactive)
              jpalacios Juan Palacios (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: