CustomFieldIndexerAdapter does not delegate correctly wrapped object

XMLWordPrintable

    • 8.1
    • 1
    • Severity 3 - Minor

      Issue Summary

      Having multiple indexers with the same id registered via multiple custom fields might cause the issue with reindexing due to CustomFieldIndexerAdapter doesn't delegate correctly.

      Context:

      • It uses equals() and hashCode() from Object instead of delegating to the wrapped object which means that custom field indexers returned from com.atlassian.jira.issue.index.managers.FieldIndexerManagerImpl.getAllIssueIndexers() are no longer deduped.

      Expected Results

      CustomFieldIndexerAdapter delegates correctly

      Actual Results

      CustomFieldIndexerAdapter doesn't delegate correctly

      The below exception is thrown in the Jira file during reindexing:

      java.lang.IllegalArgumentException: DocValuesField "sr_num_atch" appears more than once in this document (only one value is allowed per field)
      

      Workaround

      None

            Assignee:
            Kenny MacLeod
            Reporter:
            Andriy Yakovlev [Atlassian]
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: