[
https://issues.apache.org/jira/browse/SOLR-12059?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401443#comment-16401443
]
Shawn Heisey commented on SOLR-12059:
-------------------------------------
bq. We want to rename the solr.xml to add some versioning and date to the file
name.
None of the information before now has mentioned versioning or dates. It has
been about replacing "solr" with something else, which was stated as "my" in
everything I have seen before today.
Why would you need to rename solr-cell-6.5.1.jar to my-cell-6.5.1.jar if your
intent is version control? There's already a version number in the filename,
and the jars are very unlikely to ever get replaced with an incorrect version,
because another version will most likely have a different filename.
I have the same question about renaming solr-webapp to my-webapp and
solr-jetty-context.xml to my-jetty-context.xml, which were other changes you
said you wanted to make. These changes are unlikely to be related to version
control. The context file almost never requires changes, and the other one is
a directory. Most users will NEVER need to change the context file, so the
official Solr download serves as a backup copy that can always be obtained.
Renaming solrconfig.xml to myconfig.xml also seems to have little to do with
version control.
If my suspicions are unfounded and you really are interested in version
control, there are two ways to do this effectively with Solr's config files.
Neither of these methods requires any ability to change the filenames Solr is
expecting to see.
One way is to put the entire directory into version control, setting the
software to ignore anything that's not needed to make sure you don't lose
config info. This would probably mean something like svn or git. When you
make a change, you can commit it, which will ensure that the version history
isn't lost. You could even have changes pushed to a central repository, so
that if the Solr server loses all of its data, you still have all of your
config information.
The other way is to copy the active config file to a versioned backup whenever
you change it. So for solr.xml, you will have a bunch of other files, with
names like solr-201803101900.xml ... and there would be similar backups for
other config files. Solr will typically ignore the ones with different
filenames. To make sure you don't lose this data if the Solr server dies
completely, copy the files regularly to another server.
With SolrCloud, where the active configs are in zookeeper, you would want to
maintain a separate on-disk config tree somewhere and do version control on
that, uploading changes to ZK after making changes in the on-disk directory and
doing whatever's necessary to keep your version history.
If you really feel like you need to rename solr.xml, then edit the source code,
change it, and recompile Solr. I haven't seen a compelling reason to make it
configurable for everyone. It certainly COULD be configurable, but there are
always risks of bugs when something is made configurable. Because of that,
configurability is only added to things where there is a REALLY good reason.
Thinking about it from the standpoint of supporting users, it is very nice to
be able to mention the solr.xml filename and be SURE that this is the file the
user needs to look for.
> Unable to rename solr.xml
> -------------------------
>
> Key: SOLR-12059
> URL: https://issues.apache.org/jira/browse/SOLR-12059
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Affects Versions: 6.5.1
> Environment: Renaming of solr,xml in the $SOLR_HOME directory
> Reporter: Edwin Yeo Zheng Lin
> Priority: Major
>
> I am able to rename the flie names like solrconfig.xml and solr.log to custom
> names like myconfig.xml and my.log quite seamlessly.
> However, I am not able to rename the same for solr.xml. Understand that the
> solr.xml is hard-coded at the SolrXmlConfig.java. Meaning it requires a
> re-compile of the Jar file in order to rename it.
> Since we can rename files like solrconfig.xml from the properties files, so
> we should do the same for solr.xml?
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]