Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-37402

[DATA CENTER] lucene-sort-mapper is not working on multiple clusters

      If we have a plugin using the lucene-sort-mapper, when switching nodes we get the following exception:

      java.lang.IllegalStateException: Cannot retrieve plugin module before it is enabled: PluginModuleHolder[(unknown; not enabled)]
      at com.atlassian.confluence.plugin.module.PluginModuleHolder.getModule(PluginModuleHolder.java:102)
      	at com.atlassian.confluence.plugin.descriptor.search.AbstractLuceneMapperModuleDescriptor.getModule(AbstractLuceneMapperModuleDescriptor.java:58)
      

      Workaround

      The workaround is enabling and disabling the plugin in the other node which fixes it until the next use of the lucene-sort-mapper which will break it again.

      I've create a simple component that fires the PluginEnabledEvent which makes it work, but this should be fixed on Atlassian's side.

      Please find attached the full stacktrace plus the test component that I used to fix it.

      We've disabled this feature and will be waiting for a fix from Atlassian to re-enable it.

        1. RateLogging.java
          0.5 kB
        2. stack_trace.txt
          46 kB

            [CONFSERVER-37402] [DATA CENTER] lucene-sort-mapper is not working on multiple clusters

            Got here from Support Tool Pluggin, but I don't use Cluster.

            ChangJoon Lee added a comment - Got here from Support Tool Pluggin, but I don't use Cluster.

            Hi David,

            Thanks for fixing the issue. Is there a way to get the 5.8.3 Data Center build so we could test it?

            Cheers,
            Rafael

            Rafael Franco added a comment - Hi David, Thanks for fixing the issue. Is there a way to get the 5.8.3 Data Center build so we could test it? Cheers, Rafael

            Rafael Franco added a comment - - edited

            Hi David,

            Makes sense your explanation. Regarding your question, our plugins work just fine on a single node cluster (CDC in a single node cluster) as well as the standalone version. Currently our Community Forums and Rate plugin cannot be marked as Data Center compatible because of this issue.

            Cheers,
            Rafael

            Rafael Franco added a comment - - edited Hi David, Makes sense your explanation. Regarding your question, our plugins work just fine on a single node cluster (CDC in a single node cluster) as well as the standalone version. Currently our Community Forums and Rate plugin cannot be marked as Data Center compatible because of this issue. Cheers, Rafael

            Hi rfranco1,

            I'm fairly certain that this second issue is a symptom of the first one. Even if the plugin is enabled, the mapper registry doesn't get updated, so the call to com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.toLuceneSort(LuceneSearchManager.java:225) doesn't find the mapper.

            However, just to be sure, can I ask you if you've tried this on a single node cluster? If you run CDC as a single node cluster, install the plugin, does it still fail? I suspect it will work fine.

            Thanks,
            David

            David Rizzuto added a comment - Hi rfranco1 , I'm fairly certain that this second issue is a symptom of the first one. Even if the plugin is enabled, the mapper registry doesn't get updated, so the call to com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.toLuceneSort(LuceneSearchManager.java:225) doesn't find the mapper. However, just to be sure, can I ask you if you've tried this on a single node cluster? If you run CDC as a single node cluster, install the plugin, does it still fail? I suspect it will work fine. Thanks, David

            Hi David,

            From my understanding it seems there's two issues: One is, as you mentioned, the event not being propagated across all nodes. The other one is related with the "lucene mapper could not be found" even though it's defined in the plugin.xml

            Let me know if you need my assistance in replicating those.

            Thank you,
            Rafael

            Rafael Franco added a comment - Hi David, From my understanding it seems there's two issues: One is, as you mentioned, the event not being propagated across all nodes. The other one is related with the "lucene mapper could not be found" even though it's defined in the plugin.xml Let me know if you need my assistance in replicating those. Thank you, Rafael

            It appears there is a bug here: the lucene mapper registry is not getting updated across all nodes when a change happens to the plugin system. Obviously, this shouldn't happen: we need to make sure the plugin event is correctly propagated across to the other nodes.

            David Rizzuto added a comment - It appears there is a bug here: the lucene mapper registry is not getting updated across all nodes when a change happens to the plugin system. Obviously, this shouldn't happen: we need to make sure the plugin event is correctly propagated across to the other nodes.

            After I enable the plugin I'm also getting:

            com.atlassian.confluence.search.v2.InvalidSearchException: com.atlassian.confluence.search.v2.lucene.LuceneMapperNotFoundException: A lucene mapper could not be found to map an object of type: com.adaptavist.confluence.forums.search.sort.ForumSearchSort and key: forum-sort-lastactivitydate
            at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.toLuceneSort(LuceneSearchManager.java:225)
            at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:125)
            at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:118)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:606)
            at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129)

            So although the plugin.xml has that lucene-sort-mapper defined, it doesn't pick it up. This is a blocker for us in regards to Data Center

            Rafael Franco added a comment - After I enable the plugin I'm also getting: com.atlassian.confluence.search.v2.InvalidSearchException: com.atlassian.confluence.search.v2.lucene.LuceneMapperNotFoundException: A lucene mapper could not be found to map an object of type: com.adaptavist.confluence.forums.search.sort.ForumSearchSort and key: forum-sort-lastactivitydate at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.toLuceneSort(LuceneSearchManager.java:225) at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:125) at com.atlassian.confluence.search.v2.lucene.LuceneSearchManager.search(LuceneSearchManager.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) So although the plugin.xml has that lucene-sort-mapper defined, it doesn't pick it up. This is a blocker for us in regards to Data Center

            Is there any timeline for this? We had to disable all plugins that use the lucene-sort-mapper because they don't work in Data Center...

            Rafael Franco added a comment - Is there any timeline for this? We had to disable all plugins that use the lucene-sort-mapper because they don't work in Data Center...

              drizzuto David Rizzuto
              3c7c04d87d93 Rafael Franco
              Affected customers:
              12 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: