Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2352

IndexVersion.java attempts (and fails) to update and maintain empty indexes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: None
    • Labels:
      None
    • Attachments:
      1
    • Comments:
      10
    • Documentation Status:
      Not Required

      Description

      The new ant target update_solr_indexes makes use of dspace-api/src/main/java/org/dspace/app/util/IndexVersion.java. IndexVersion.java will attempt to update an empty index, and will fail. In development environments, is possible to have an empty index. This situation is a hinderance to developement, as it requires one to first manually delete the empty index. It also fosters the habit of deleting indexes to resolve issues, which is not a habit we should be encouraging. At this point: https://github.com/DSpace/DSpace/blob/58f7734400ac0b8e2dfc465d92b1b3d5f41c96a9/dspace-api/src/main/java/org/dspace/app/util/IndexVersion.java#L106

      The index directory is validated for existence, it would be a simple thing to add one additional validation task to ensure the index is populated. An empty index is, I think, an empty directory, so we could just check to see if the directory is empty and if it is empty, stop any further attempts to identify the index version.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tdonohue Tim Donohue
              Reporter:
              hardyoyo Hardy Pottinger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: