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

Default value for 'loadOnStartup' is fuzzy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 9.6
    • 9.7
    • None

    Description

      Each core has property loadOnStartup to decide if the core is opened at start-up or delayed until first access.

      When creating a new core and not specifying the property in the request, we take the default value from CoreDescriptor.defaultProperties which is true.

      defaultProperties
        private static final Map<String, String> defaultProperties = Map.of(...., CORE_LOADONSTARTUP, "true");
      

      Then, when we retrieve the value of the property in CoreDescriptor.isLoadOnStartup(), if the property is not the core stored properties, default value is false.

      isLoadOnStartup()
          String tmp = coreProperties.getProperty(CORE_LOADONSTARTUP, "false");
      

      Impact is low since all cores are created with value "true" when not explicitly created, using value from the default properties. This just makes the code confusing to read.

      Attachments

        Issue Links

          Activity

            People

              epugh Eric Pugh
              pierre.salagnac Pierre Salagnac
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m