Uploaded image for project: 'DSpace (LEGACY)'
  1. DSpace (LEGACY)
  2. DS-4479

MetadataExposureService caches all "metadata.hide.*" configurations internally

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Volunteer Needed (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 6.3, 7.0
    • Fix Version/s: None
    • Component/s: configuration, DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      0
    • Documentation Status:
      Not Required

      Description

      Discovered in this PR: https://github.com/DSpace/DSpace/pull/2719#issuecomment-611415255

      Currently the MetadataExposureServiceImpl caches all the "metadata.hide.*" configurations in an internally stored Map: https://github.com/DSpace/DSpace/blob/master/dspace-api/src/main/java/org/dspace/app/util/MetadataExposureServiceImpl.java#L63

      This means these settings are loaded once (when the MetadataExposureService first loads in Spring configs), and cached thereafter. So, changing the "metadata.hide.*" configurations after that fact has no effect (likely until Tomcat is rebooted).

      This Service should be updated to no longer cache these configs and instead load them dynamically from the ConfigurationService, likely using the new `getPropertyKeys(String prefix)` method which would be much more efficient than the current code. See https://github.com/DSpace/DSpace/blob/master/dspace-services/src/main/java/org/dspace/servicemanager/config/DSpaceConfigurationService.java#L135

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            tdonohue Tim Donohue
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated: