Merge lp:~mmcm/akiban-persistit/config-reload-properties into lp:akiban-persistit
Status: | Needs review |
---|---|
Proposed branch: | lp:~mmcm/akiban-persistit/config-reload-properties |
Merge into: | lp:akiban-persistit |
Diff against target: |
22 lines (+12/-0) 1 file modified
src/main/java/com/persistit/Configuration.java (+12/-0) |
To merge this branch: | bzr merge lp:~mmcm/akiban-persistit/config-reload-properties |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Peter Beaman | Needs Information | ||
Review via email:
|
Description of the change
Add Configuration.
Configuration has various bits of state that are initialized from the properties when the Configuration(
I am open to suggestions on how else to do this. See lp:~mmcm/akiban-server/tree-schema-map-wildcards for the server use case.
Unmerged revisions
- 430. By Mike McMahon
-
Add a method to Configuration to update cached values after properties have changed.
Already has a setProperty method.
Could the dynamic volume loading be done without changing the Configuration? The volumeSpecifica tions list in Configuration is used only during system initialization. You can create and/or open volumes not specified in the Configuration with Persistit# loadVolume( VolumeSpecifica tion)*. It is not necessary for every volume to specified in the Configuration's volume list. The API is messy in that respect due to the late addition of an API for creating and opening new volumes.
In the server branch I saw code that laboriously creates new properties, but I did not see any code to open the associated volumes. I think we could simplify the process by creating a VolumeSpecification for each dynamic volume, calling the loadVolume method, and ignoring the Configuration.
I am inclined to remove or at least deprecate Configuration# setProperty. There appear to be no callers.
* I think Persistit# loadVolume is broken; there's code in the initializeVolumes loop to try to match existing volumes described by the journal but not yet open; I think this code also has to appear in the loadVolume code, and further that initializeVolumes should simply be calling the corrected loadVolume for each VolumeSpecifica tion. I will investigate that further.