Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Default settings for database configuration #43

Closed
miguelrgonzalez opened this issue Aug 29, 2012 · 2 comments
Closed

Default settings for database configuration #43

miguelrgonzalez opened this issue Aug 29, 2012 · 2 comments

Comments

@miguelrgonzalez
Copy link
Contributor

It will be quite handy that during setup:apply-database-settings at xquery/setup.xqy, instead of doing nothing whenever a value it's not set, it would default to some other value.

Like this, we would make sure that the database configuration and the configuration are perfectly aligned after a bootstrap.

Example:

let $value := setup:get-setting-from-database-config-as-string($database-config, "directory-creation")
let $admin-config :=
   if ($value) then
       admin:database-set-directory-creation($admin-config, $database, $value)
  else
       admin:database-set-directory-creation($admin-config, $database, "manual")

After a bootstrap it won't matter if somebody changed the setting manually or somebody removed the line from the config file. The setting will default to Manual and automatic directory creation will be disabled.

Thanks!

Again: I could send a pull request if you think it's interesting for everybody else.

@grtjn
Copy link
Contributor

grtjn commented Apr 23, 2014

It is done the current way to make Roxy benefit from built-in defaults, or only make it touch important values.

If you want dir creation to be manual, it obviously is important to you. I would suggest making sure it is always added to ml-config, possibly with a comment DON'T REMOVE.. ;-)

@grtjn
Copy link
Contributor

grtjn commented Jun 13, 2017

Old ticket, but still thinking the same. The current implementation was by design, and it would touch a lot of code to change this. Moreover, it would hard-code particular defaults where you most often don't want to. Think about cache settings for instance.

If you like to make all database options explicit, consider copying in this config fragment with settings from an out of the box Documents database: https://github.com/marklogic/roxy/blob/master/deploy/sample/default-docs-config.sample.xml

@grtjn grtjn self-assigned this Jun 13, 2017
@grtjn grtjn added this to the July 2017 milestone Jun 13, 2017
@grtjn grtjn closed this as completed Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants