Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-4714

Enable Incremental Sync on All Cases, For Application to Crowd Syncs

    • Icon: Suggestion Suggestion
    • Resolution: Duplicate
    • None
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:

        private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
          {
              for (Directory directory : activeDirectories)
              {
                  // No events are generated for cacheable directories that are not cached
                  if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                  {
                      throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                  }
              }
          }
      

      Where com.atlassian.crowd.directory.sync.cache.enabled is set to false, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to always true, for delegated directories

            [CWD-4714] Enable Incremental Sync on All Cases, For Application to Crowd Syncs

            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3388973 ] New: JAC Suggestion Workflow 3 [ 3630352 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Simplified Crowd Development Workflow v2 [ 1397897 ] New: JAC Suggestion Workflow [ 3388973 ]
            Issue Type Original: Improvement [ 4 ] New: Suggestion [ 10000 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Lukasz Pater made changes -
            Resolution New: Duplicate [ 3 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]
            Lukasz Pater made changes -
            Link New: This issue duplicates CWD-3717 [ CWD-3717 ]
            Lukasz Pater made changes -
            Description Original: Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:
            {code}
              private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
                {
                    for (Directory directory : activeDirectories)
                    {
                        // No events are generated for cacheable directories that are not cached
                        if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                        {
                            throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                        }
                    }
                }
            {code}
            Where {{com.atlassian.crowd.directory.sync.cache.enabled}} is set to *false*, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to *always true*, for *delegated directories*

            h3.Workaround
            Run this query in the Crowd DB:
            {code}
            UPDATE cwd_directory_attribute SET attribute_value = 'true' WHERE attribute_name = 'com.atlassian.crowd.directory.sync.cache.enabled' AND directory_id = <directoryid>;
            {code}
            Where <directoryID> is the directory ID of the delegated directory.

            This will require a Crowd restart
            New: Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:
            {code}
              private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
                {
                    for (Directory directory : activeDirectories)
                    {
                        // No events are generated for cacheable directories that are not cached
                        if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                        {
                            throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                        }
                    }
                }
            {code}
            Where {{com.atlassian.crowd.directory.sync.cache.enabled}} is set to *false*, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to *always true*, for *delegated directories*
            Foo Sim (Inactive) made changes -
            Description Original: Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:
            {code}
              private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
                {
                    for (Directory directory : activeDirectories)
                    {
                        // No events are generated for cacheable directories that are not cached
                        if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                        {
                            throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                        }
                    }
                }
            {code}
            Where {{com.atlassian.crowd.directory.sync.cache.enabled}} is set to *false*, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to *always true*, for *delegated directories*

            New: Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:
            {code}
              private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
                {
                    for (Directory directory : activeDirectories)
                    {
                        // No events are generated for cacheable directories that are not cached
                        if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                        {
                            throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                        }
                    }
                }
            {code}
            Where {{com.atlassian.crowd.directory.sync.cache.enabled}} is set to *false*, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to *always true*, for *delegated directories*

            h3.Workaround
            Run this query in the Crowd DB:
            {code}
            UPDATE cwd_directory_attribute SET attribute_value = 'true' WHERE attribute_name = 'com.atlassian.crowd.directory.sync.cache.enabled' AND directory_id = <directoryid>;
            {code}
            Where <directoryID> is the directory ID of the delegated directory.

            This will require a Crowd restart
            Foo Sim (Inactive) made changes -
            Description Original: Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:
            {code}
              private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
                {
                    for (Directory directory : activeDirectories)
                    {
                        // No events are generated for cacheable directories that are not cached
                        if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                        {
                            throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                        }
                    }
                }
            {code}
            Where {{com.atlassian.crowd.directory.sync.cache.enabled}} is set to *false*, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to *always true*, for *delegated directories*
            New: Incremental sync for an application (client application such as Confluence synchronising from Crowd), is disabled if the following condition is met:
            {code}
              private void assertIncrementalSynchronisationIsAvailable(List<Directory> activeDirectories) throws IncrementalSynchronisationNotAvailableException
                {
                    for (Directory directory : activeDirectories)
                    {
                        // No events are generated for cacheable directories that are not cached
                        if (isFalse(toBooleanObject(directory.getValue(DirectoryProperties.CACHE_ENABLED))))
                        {
                            throw new IncrementalSynchronisationNotAvailableException("Directory '" + directory.getName() + "' is not cached and so cannot be incrementally synchronised");
                        }
                    }
                }
            {code}
            Where {{com.atlassian.crowd.directory.sync.cache.enabled}} is set to *false*, for the directory's attribute in cwd_directory_attribute. Considering that users and groups for an uncached directory is still cached in the DB anyway, it seems that this check does nothing but to create sync performance issues for customers with delegated directories (it will always fall back to full sync). We should remove this check altogether, or at least, set cache.enabled to *always true*, for *delegated directories*

            Foo Sim (Inactive) created issue -

              Unassigned Unassigned
              fsim Foo Sim (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: