Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-15462

Dubious code in DistribPackageStore::refresh

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Package Manager

    Description

      The code in DistribPackageStore::refresh is slightly dubious. Discovered while working on SOLR-15385...

          @SuppressWarnings({"rawtypes"})
          List l = null;
      
            l = coreContainer.getZkController().getZkClient().getChildren(ZK_PACKAGESTORE + path, null, true);
      
            @SuppressWarnings({"rawtypes"})
            List myFiles = list(path, s -> true);
      
            for (Object f : l) {
              // TODO: XXX DUBIOUS XXX
              // l should be a List<String> and myFiles should be a List<FileDetails>, so contains should always return false!
              if (!myFiles.contains(f)) {
      

      This is concerning because if we have proper typing, then contains should always return false. Are we always downloading the files and improperly caching the results?

      Attachments

        Activity

          People

            Unassigned Unassigned
            mdrob Mike Drob
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: